-
Notifications
You must be signed in to change notification settings - Fork 25
/
Makefile
67 lines (48 loc) · 2.03 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
56
57
58
59
60
61
62
63
64
65
66
67
all:
echo "We don't need any build"
installd_list = pack.d repack.d prescription.d play.d desktop.d
cmd_list = epm serv esu
.PHONY: all clean install check install_common $(installd_list) $(cmd_list)
# get version from the spec by default
PKGVER = $(shell grep "^Version: " eepm.spec | cut -d" " -f2)
PKGREL = $(shell grep "^Release: " eepm.spec | cut -d" " -f2)
version := $(PKGVER)-$(PKGREL)
pkgdatadir=$(datadir)/eepm
install: install_common $(installd_list) $(cmd_list)
install_common:
mkdir -p $(DESTDIR)$(bindir)/
# breaks link
cp -a `ls -1 bin/* | grep -v "[-_]"` $(DESTDIR)$(bindir)/
cp -a bin/distr_info $(DESTDIR)$(bindir)/
chmod 0755 $(DESTDIR)$(bindir)/*
mkdir -p $(DESTDIR)$(pkgdatadir)/
cp -a `ls -1 bin/* | grep "[-_]"` $(DESTDIR)$(pkgdatadir)/
rm -f $(DESTDIR)$(pkgdatadir)/distr_info
mkdir -p $(DESTDIR)$(sysconfdir)/eepm/
cp -a etc/eepm.conf $(DESTDIR)$(sysconfdir)/eepm/
cp -a etc/serv.conf $(DESTDIR)$(sysconfdir)/eepm/
cp -a etc/*.list $(DESTDIR)$(sysconfdir)/eepm/
mkdir -p $(DESTDIR)$(mandir)/man1
cp -a `ls -1 man/*` $(DESTDIR)$(mandir)/man1/
mkdir -p $(DESTDIR)$(sysconfdir)/bash_completion.d/
install -m 0644 bash_completion/serv $(DESTDIR)$(sysconfdir)/bash_completion.d/serv
install -m 0644 bash_completion/eepm $(DESTDIR)$(sysconfdir)/bash_completion.d/eepm
mkdir -p $(DESTDIR)$(datadir)/zsh/Completion/Linux/
install -m 0644 zsh_completion/_eepm $(DESTDIR)$(datadir)/zsh/Completion/Linux/
# shebang.req.files
chmod a+x $(DESTDIR)$(pkgdatadir)/serv-*
chmod a+x $(DESTDIR)$(pkgdatadir)/epm-*
chmod a+x $(DESTDIR)$(pkgdatadir)/tools_*
mkdir -p $(DESTDIR)/var/lib/eepm/
mkdir -p $(DESTDIR)/var/cache/eepm/
$(cmd_list):
sed -e "s|SHAREDIR=.*|SHAREDIR=$(pkgdatadir)|g" \
-e "s|CONFIGDIR=.*|CONFIGDIR=$(sysconfdir)/eepm|g" \
-e "s|@VERSION@|$(version)|g" <bin/$@ >$(DESTDIR)$(bindir)/$@
chmod 0755 $(DESTDIR)$(bindir)/$@
$(installd_list):
mkdir -p $(DESTDIR)$(sysconfdir)/eepm/$@/
cp $@/* $(DESTDIR)$(sysconfdir)/eepm/$@/
chmod 0755 $(DESTDIR)$(sysconfdir)/eepm/$@/*.sh
check:
echo "test suite.."