-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
54 lines (46 loc) · 1.52 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
PERL_DEST != perl -MConfig -e 'print $$Config{installvendorlib} || $$Config{installsitelib}'
PREFIX := /usr
DESTDIR :=
BINDIR := $(PREFIX)/bin
PKGNAME = pacsub
PKGVER != grep -E '^[0-9]{4}-[0-9]{2}-[0-9]{2} .* \([0-9.][0-9.]+\)$$' ChangeLog \
| sed -e 's/^.*(//;s/)$$//'
DISTDIR := $(PKGNAME)-$(PKGVER)
DISTFILES := \
README.md ChangeLog LICENSE \
Makefile \
pacsub-manage \
PacSub/AccessControl.pm \
PacSub/CLI.pm \
PacSub/Config.pm \
PacSub/Gpg.pm \
PacSub/Package.pm \
PacSub/Repo.pm \
PacSub/Tools.pm \
PacSub/User.pm \
all:
.PHONY: version
version:
@echo $(PKGVER)
.PHONY: dist
dist:
mkdir $(DISTDIR)
mkdir $(DISTDIR)/PacSub
cp ChangeLog LICENSE Makefile $(DISTDIR)/
cp pacsub-manage $(DISTDIR)/
cp PacSub/*.pm $(DISTDIR)/PacSub/
tar czvf $(DISTDIR).tar.gz $(DISTDIR)
rm -rf $(DISTDIR)
.PHONY: install
install:
install -dm755 $(DESTDIR)$(PERL_DEST)/PacSub
install -m644 PacSub/AccessControl.pm $(DESTDIR)$(PERL_DEST)/PacSub/
install -m644 PacSub/CLI.pm $(DESTDIR)$(PERL_DEST)/PacSub/
install -m644 PacSub/Config.pm $(DESTDIR)$(PERL_DEST)/PacSub/
install -m644 PacSub/Gpg.pm $(DESTDIR)$(PERL_DEST)/PacSub/
install -m644 PacSub/Package.pm $(DESTDIR)$(PERL_DEST)/PacSub/
install -m644 PacSub/Repo.pm $(DESTDIR)$(PERL_DEST)/PacSub/
install -m644 PacSub/Tools.pm $(DESTDIR)$(PERL_DEST)/PacSub/
install -m644 PacSub/User.pm $(DESTDIR)$(PERL_DEST)/PacSub/
install -dm755 $(DESTDIR)$(BINDIR)
install -m755 pacsub-manage $(DESTDIR)$(BINDIR)/pacsub-manage