Makefile 3.3 KB
Newer Older
1
Version = $(shell git describe --abbrev=0 --tags)
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 \
9
	bin/check-translate.in \
Bernhard Landauer's avatar
Bernhard Landauer committed
10
	bin/ma-launcher \
11
	bin/manjaro-architect
Bernhard Landauer's avatar
Bernhard Landauer committed
12 13

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

LISTS = \
Bernhard Landauer's avatar
Bernhard Landauer committed
24 25 26
	data/package-lists/base-openrc-manjaro \
	data/package-lists/base-systemd-manjaro \
	data/package-lists/input-drivers
Bernhard Landauer's avatar
Bernhard Landauer committed
27 28 29 30 31 32 33 34 35
	
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 \
Bernhard Landauer's avatar
Bernhard Landauer committed
36
	data/translations/polish.trans \
Bernhard Landauer's avatar
Bernhard Landauer committed
37 38 39
	data/translations/portuguese.trans \
	data/translations/portuguese_brasil.trans \
	data/translations/russian.trans \
40
	data/translations/ukrainian.trans \
Oğuz Kağan EREN's avatar
Oğuz Kağan EREN committed
41 42
	data/translations/spanish.trans \
	data/translations/turkish.trans
Bernhard Landauer's avatar
Bernhard Landauer committed
43 44 45 46 47 48 49

ICONS = \
    data/manjaro-architect.png

LAUNCHER = \
	data/manjaro-architect.desktop

Matti Hyttinen's avatar
Matti Hyttinen committed
50
DIALOGRC = \
Matti Hyttinen's avatar
Matti Hyttinen committed
51 52
	data/dialogrc \
	data/dialogrc_gui
Matti Hyttinen's avatar
Matti Hyttinen committed
53

Bernhard Landauer's avatar
Bernhard Landauer committed
54 55 56 57 58 59 60 61
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
62
	-e "s|@version@|${Version}|"
Bernhard Landauer's avatar
Bernhard Landauer committed
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77

%: %.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
78
	install -dm0755 $(DESTDIR)$(PREFIX)$(LIBDIR)
Bernhard Landauer's avatar
Bernhard Landauer committed
79 80
	install -m0644 ${LIBS} $(DESTDIR)$(PREFIX)$(LIBDIR)

Bernhard Landauer's avatar
Bernhard Landauer committed
81
	install -dm0755 $(DESTDIR)$(PREFIX)$(DATADIR)/package-lists
Bernhard Landauer's avatar
Bernhard Landauer committed
82
	install -m0644 ${LISTS} $(DESTDIR)$(PREFIX)$(DATADIR)/package-lists
Bernhard Landauer's avatar
Bernhard Landauer committed
83
	
Bernhard Landauer's avatar
Bernhard Landauer committed
84
	install -dm0755 $(DESTDIR)$(PREFIX)$(DATADIR)/translations
Bernhard Landauer's avatar
Bernhard Landauer committed
85
	install -m0644 ${LANG} $(DESTDIR)$(PREFIX)$(DATADIR)/translations
Bernhard Landauer's avatar
Bernhard Landauer committed
86

Bernhard Landauer's avatar
Bernhard Landauer committed
87
	install -dm0755 $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
Bernhard Landauer's avatar
Bernhard Landauer committed
88 89 90 91 92
	install -m0644 ${ICONS} $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
	
	install -dm0755 $(DESTDIR)$(PREFIX)/share/applications
	install -m0644 ${LAUNCHER} $(DESTDIR)$(PREFIX)/share/applications
	
Matti Hyttinen's avatar
Matti Hyttinen committed
93 94 95
	install -dm0755 $(DESTDIR)$(PREFIX)$(DATADIR)
	install -m0644 ${DIALOGRC} $(DESTDIR)$(PREFIX)$(DATADIR)
	
Bernhard Landauer's avatar
Bernhard Landauer committed
96 97 98 99 100
	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
101 102 103 104
	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
105
	for f in ${LAUNCHER}; do rm -f $(DESTDIR)$(PREFIX)/share/applications/$$f; done
Matti Hyttinen's avatar
Matti Hyttinen committed
106
	for f in ${DIALOGRC}; do rm -f $(DESTDIR)$(PREFIX)$(DATADIR)/$$f; done
Bernhard Landauer's avatar
Bernhard Landauer committed
107
	for f in ${LIVE}; do rm -f $(DESTDIR)/etc/skel/.config/autostart/$$f; done
Bernhard Landauer's avatar
Bernhard Landauer committed
108 109 110 111 112 113 114 115 116 117

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