-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
54 lines (37 loc) · 1.3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
prefix ?= /usr
bindir ?= $(prefix)/bin
datadir ?= $(prefix)/share
APPDATADIR ?= $(datadir)/appdata
DESKTOPDIR ?= $(datadir)/applications
ICONDIR ?= $(datadir)/icons/hicolor
PIXMAPDIR ?= $(datadir)/pixmaps
FLAKE8 ?= /usr/bin/flake8
INSTALL ?= /usr/bin/install -p
RM ?= /usr/bin/rm
SED ?= /usr/bin/sed
TOUCH ?= /bin/touch
APPNAME = gnome-password-generator
DESTDIR =
.PHONY: all build clean install lint
all: build
$(APPNAME):
$(SED) 's|/usr/share/pixmaps|$(PIXMAPDIR)|' < [email protected] > $@
$(TOUCH) -r [email protected] $@
build: $(APPNAME)
install: build
$(INSTALL) -d -pm0755 $(DESTDIR)$(bindir)
$(INSTALL) -pm0755 $(APPNAME) $(DESTDIR)$(bindir)
$(INSTALL) -d -pm0755 $(DESTDIR)$(APPDATADIR)
$(INSTALL) -pm0644 data/$(APPNAME).appdata.xml $(DESTDIR)$(APPDATADIR)
$(INSTALL) -d -pm0755 $(DESTDIR)$(DESKTOPDIR)
$(INSTALL) -pm0644 data/$(APPNAME).desktop $(DESTDIR)$(DESKTOPDIR)
$(INSTALL) -d -pm0755 $(DESTDIR)$(ICONDIR)/96x96/apps
$(INSTALL) -pm0644 data/$(APPNAME).png $(DESTDIR)$(ICONDIR)/96x96/apps
$(INSTALL) -d -pm0755 $(DESTDIR)$(ICONDIR)/scalable/apps
$(INSTALL) -pm0644 data/$(APPNAME).svg $(DESTDIR)$(ICONDIR)/scalable/apps
$(INSTALL) -d -pm0755 $(DESTDIR)$(PIXMAPDIR)
$(INSTALL) -pm0644 data/$(APPNAME).png $(DESTDIR)$(PIXMAPDIR)
clean:
$(RM) -fr $(APPNAME)
lint:
$(FLAKE8) $(APPNAME).py