Makefile 2.95 KB
Newer Older
Bernhard Landauer's avatar
Bernhard Landauer committed
1
Version=0.8.5
Bernhard Landauer's avatar
Bernhard Landauer committed
2 3 4 5 6 7 8

PREFIX = /usr
LIBDIR = /lib/manjaro-architect
DATADIR = /share/manjaro-architect

BIN = \
	bin/btrfs-subvol-functions \
Bernhard Landauer's avatar
Bernhard Landauer committed
9
	bin/check-translate \
Bernhard Landauer's avatar
Bernhard Landauer committed
10
	bin/ma-launcher \
Bernhard Landauer's avatar
Bernhard Landauer committed
11 12
	bin/manjaro-architect \
	bin/nw_check
Bernhard Landauer's avatar
Bernhard Landauer committed
13 14

LIBS = \
15
	lib/ini_val.sh \
Bernhard Landauer's avatar
Bernhard Landauer committed
16
	lib/util.sh \
Bernhard Landauer's avatar
Bernhard Landauer committed
17
	lib/util-advanced.sh \
Bernhard Landauer's avatar
Bernhard Landauer committed
18
	lib/util-base.sh \
19
	lib/util-config.sh \
Bernhard Landauer's avatar
Bernhard Landauer committed
20 21
	lib/util-desktop.sh \
	lib/util-disk.sh \
22
	lib/util-menu.sh
Bernhard Landauer's avatar
Bernhard Landauer committed
23 24

LISTS = \
Bernhard Landauer's avatar
typo  
Bernhard Landauer committed
25 26 27
	data/package-lists/base-openrc-manjaro \
	data/package-lists/base-systemd-manjaro \
	data/package-lists/input-drivers
Bernhard Landauer's avatar
Bernhard Landauer committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
	
LANG = \
	data/translations/danish.trans \
	data/translations/dutch.trans \
	data/translations/english.trans \
	data/translations/french.trans \
	data/translations/german.trans \
	data/translations/hungarian.trans \
	data/translations/italian.trans \
	data/translations/portuguese.trans \
	data/translations/portuguese_brasil.trans \
	data/translations/russian.trans \
	data/translations/spanish.trans

ICONS = \
    data/manjaro-architect.png

LAUNCHER = \
	data/manjaro-architect.desktop

LIVE = \
	data/ma-launcher.desktop

all: $(BIN)

edit = \
    sed -e "s|@datadir[@]|$(DESTDIR)$(PREFIX)$(DATADIR)|g" \
	-e "s|@libdir[@]|$(DESTDIR)$(PREFIX)$(LIBDIR)|g" \
Bernhard Landauer's avatar
Bernhard Landauer committed
56
	-e "s|@version@|${Version}|"
Bernhard Landauer's avatar
Bernhard Landauer committed
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71

%: %.in Makefile
	@echo "GEN $@"
	@$(RM) "$@"
	@m4 -P $@.in | $(edit) >$@
	@chmod a-w "$@"
	@chmod +x "$@"

clean:
	rm -f $(BIN)

install:
	install -dm0755 $(DESTDIR)$(PREFIX)/bin
	install -m0755 ${BIN} $(DESTDIR)$(PREFIX)/bin

Bernhard Landauer's avatar
Bernhard Landauer committed
72
	install -dm0755 $(DESTDIR)$(PREFIX)$(LIBDIR)
Bernhard Landauer's avatar
Bernhard Landauer committed
73 74
	install -m0644 ${LIBS} $(DESTDIR)$(PREFIX)$(LIBDIR)

Bernhard Landauer's avatar
Bernhard Landauer committed
75
	install -dm0755 $(DESTDIR)$(PREFIX)$(DATADIR)/package-lists
Bernhard Landauer's avatar
Bernhard Landauer committed
76
	install -m0644 ${LISTS} $(DESTDIR)$(PREFIX)$(DATADIR)/package-lists
Bernhard Landauer's avatar
Bernhard Landauer committed
77
	
Bernhard Landauer's avatar
Bernhard Landauer committed
78
	install -dm0755 $(DESTDIR)$(PREFIX)$(DATADIR)/translations
Bernhard Landauer's avatar
Bernhard Landauer committed
79
	install -m0644 ${LANG} $(DESTDIR)$(PREFIX)$(DATADIR)/translations
Bernhard Landauer's avatar
Bernhard Landauer committed
80

Bernhard Landauer's avatar
Bernhard Landauer committed
81
	install -dm0755 $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
Bernhard Landauer's avatar
Bernhard Landauer committed
82 83 84 85 86 87 88 89 90 91
	install -m0644 ${ICONS} $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
	
	install -dm0755 $(DESTDIR)$(PREFIX)/share/applications
	install -m0644 ${LAUNCHER} $(DESTDIR)$(PREFIX)/share/applications
	
	install -dm0755 $(DESTDIR)/etc/skel/.config/autostart
	install -m0644 ${LIVE} $(DESTDIR)/etc/skel/.config/autostart

uninstall:
	for f in ${BIN}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
Bernhard Landauer's avatar
Bernhard Landauer committed
92 93 94 95
	for f in ${LIBS}; do rm -f $(DESTDIR)$(PREFIX)$(LIBDIR)/$$f; done
	for f in ${LISTS}; do rm -f $(DESTDIR)$(PREFIX)$(DATADIR)/package-lists/$$f; done
	for f in ${LANG}; do rm -f $(DESTDIR)$(PREFIX)$(DATADIR)/translations/$$f; done
	for f in ${ICONS}; do rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/$$f; done
Bernhard Landauer's avatar
Bernhard Landauer committed
96
	for f in ${LAUNCHER}; do rm -f $(DESTDIR)$(PREFIX)/share/applications/$$f; done
Bernhard Landauer's avatar
Bernhard Landauer committed
97
	for f in ${LIVE}; do rm -f $(DESTDIR)/etc/skel/.config/autostart/$$f; done
Bernhard Landauer's avatar
Bernhard Landauer committed
98 99 100 101 102 103 104 105 106 107

install: install

uninstall: uninstall

dist:
	git archive --format=tar --prefix=manjaro-architect-$(Version)/ $(Version) | gzip -9 > manjaro-architect-$(Version).tar.gz
	gpg --detach-sign --use-agent manjaro-architect-$(Version).tar.gz

.PHONY: all clean install uninstall dist