-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
55 lines (44 loc) · 1.66 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
55
# Set common variables
prefix = /usr/local
datarootdir = $(prefix)/share
datadir = $(datarootdir)/nsls2
sysconfdir = $(prefix)/etc
exec_prefix = $(prefix)
libexecdir = $(exec_prefix)/libexec
wallpapers_beamlines = $(wildcard wallpapers/beamlines/*.jpg)
wallpapers_generic = $(wildcard wallpapers/generic/*.jpg)
tabs = $(wildcard tabs/*.png)
photos = $(wildcard photos/*.jpg)
scripts = $(wildcard bin/*)
autostart = $(wildcard autostart/*.desktop)
generic_wallpaper = generic/NSLS-II_Generic_Desktop_Wallpaper_Dark.jpg
wallpaper_dir = $(datadir)/wallpapers
export wallpaper_dir
export libexecdir
.PHONY: all
all:
.PHONY: .install-scripts
.install-scripts: $(scripts)
mkdir -p $(DESTDIR)$(datadir)/bin
install -m 755 -t $(DESTDIR)$(datadir)/bin $?
.PHONY: .install-autostart
.install-autostart: $(autostart)
mkdir -p $(DESTDIR)$(sysconfdir)/xdg/autostart
install -m 644 -t $(DESTDIR)$(sysconfdir)/xdg/autostart $?
.PHONY: .install-tabs
.install-tabs: $(tabs)
mkdir -p $(DESTDIR)$(datadir)/tabs
install -m 644 -t $(DESTDIR)$(datadir)/tabs $?
.PHONY: .install-photos
.install-photos: $(photos)
mkdir -p $(DESTDIR)$(datadir)/photos
install -m 644 -t $(DESTDIR)$(datadir)/photos $?
.PHONY: .install-wallpapers
.install-wallpapers: $(wallpapers)
mkdir -p $(DESTDIR)$(wallpaper_dir)/generic
mkdir -p $(DESTDIR)$(wallpaper_dir)/beamlines
install -m 644 -t $(DESTDIR)$(wallpaper_dir)/generic $(wallpapers_generic)
install -m 644 -t $(DESTDIR)$(wallpaper_dir)/beamlines $(wallpapers_beamlines)
cd $(DESTDIR)$(wallpaper_dir) && ln -sf $(generic_wallpaper) wallpaper.jpg
.PHONY: install
install: .install-wallpapers .install-tabs .install-autostart .install-scripts .install-photos