2
echo "We don't need any build"
4
installd_list = pack.d repack.d prescription.d play.d
7
.PHONY: all clean install check install_common $(installd_list) $(cmd_list)
9
# get version from the spec by default
10
PKGVER = $(shell grep "^Version: " eepm.spec | cut -d" " -f2)
11
PKGREL = $(shell grep "^Release: " eepm.spec | cut -d" " -f2)
12
version := $(PKGVER)-$(PKGREL)
14
pkgdatadir=$(datadir)/eepm
16
install: install_common $(installd_list) $(cmd_list)
19
mkdir -p $(DESTDIR)$(bindir)/
22
cp -a `ls -1 bin/* | grep -v "[-_]"` $(DESTDIR)$(bindir)/
23
cp -a bin/distr_info $(DESTDIR)$(bindir)/
24
chmod 0755 $(DESTDIR)$(bindir)/*
26
mkdir -p $(DESTDIR)$(pkgdatadir)/
27
cp -a `ls -1 bin/* | grep "[-_]"` $(DESTDIR)$(pkgdatadir)/
28
rm -f $(DESTDIR)$(pkgdatadir)/distr_info
30
mkdir -p $(DESTDIR)$(sysconfdir)/eepm/
31
cp -a etc/eepm.conf $(DESTDIR)$(sysconfdir)/eepm/
32
cp -a etc/serv.conf $(DESTDIR)$(sysconfdir)/eepm/
33
cp -a etc/*.list $(DESTDIR)$(sysconfdir)/eepm/
35
mkdir -p $(DESTDIR)$(mandir)/man1
36
cp -a `ls -1 man/*` $(DESTDIR)$(mandir)/man1/
38
mkdir -p $(DESTDIR)$(sysconfdir)/bash_completion.d/
39
install -m 0644 bash_completion/serv $(DESTDIR)$(sysconfdir)/bash_completion.d/serv
40
install -m 0644 bash_completion/eepm $(DESTDIR)$(sysconfdir)/bash_completion.d/eepm
43
chmod a+x $(DESTDIR)$(pkgdatadir)/serv-*
44
chmod a+x $(DESTDIR)$(pkgdatadir)/epm-*
45
chmod a+x $(DESTDIR)$(pkgdatadir)/tools_*
47
mkdir -p $(DESTDIR)/var/lib/eepm/
48
mkdir -p $(DESTDIR)/var/cache/eepm/
52
sed -e "s|SHAREDIR=.*|SHAREDIR=$(pkgdatadir)|g" \
53
-e "s|CONFIGDIR=.*|CONFIGDIR=$(sysconfdir)/eepm|g" \
54
-e "s|@VERSION@|$(version)|g" <bin/$@ >$(DESTDIR)$(bindir)/$@
55
chmod 0755 $(DESTDIR)$(bindir)/$@
58
mkdir -p $(DESTDIR)$(sysconfdir)/eepm/$@/
59
cp $@/* $(DESTDIR)$(sysconfdir)/eepm/$@/
60
chmod 0755 $(DESTDIR)$(sysconfdir)/eepm/$@/*.sh