This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
54 lines (43 loc) · 1.74 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
INSTALL = install
INSTALL_DATA = $(INSTALL) -Dm644
INSTALL_PROGRAM = $(INSTALL) -Dm755
prefix = /usr
exec_prefix = $(prefix)
confdir = /etc
bindir = $(exec_prefix)/bin
libdir = $(prefix)/lib
sharedir = $(prefix)/share/pkgtools
profiledir = $(confdir)/profile.d
mandir = $(prefix)/share/man
.PHONY: all
all: install
install:
# Common functions needed by all scripts
$(INSTALL_DATA) other/functions $(DESTDIR)$(sharedir)/functions
# newpkg
$(INSTALL_PROGRAM) scripts/newpkg $(DESTDIR)$(bindir)/newpkg
$(INSTALL_DATA) other/functions.newpkg $(DESTDIR)$(sharedir)/functions.newpkg
$(INSTALL_DATA) confs/newpkg.conf $(DESTDIR)$(confdir)/pkgtools/newpkg.conf
$(INSTALL) -d $(DESTDIR)$(sharedir)/newpkg/presets/
$(INSTALL) -m644 other/newpkg_presets/* $(DESTDIR)$(sharedir)/newpkg/presets/
# spec2arch
$(INSTALL_PROGRAM) scripts/spec2arch $(DESTDIR)$(bindir)/spec2arch
$(INSTALL_DATA) confs/spec2arch.conf $(DESTDIR)$(confdir)/pkgtools/spec2arch.conf
$(INSTALL_DATA) doc/spec2arch.1 $(DESTDIR)$(mandir)/man1/spec2arch.1
$(INSTALL_DATA) doc/spec2arch.conf.5 $(DESTDIR)$(mandir)/man5/spec2arch.conf.5
# pkgconflict
$(INSTALL_PROGRAM) scripts/pkgconflict.py $(DESTDIR)$(bindir)/pkgconflict
# whoneeds
$(INSTALL_PROGRAM) scripts/whoneeds.bash $(DESTDIR)$(bindir)/whoneeds
# pkgclean
$(INSTALL_PROGRAM) scripts/pkgclean $(DESTDIR)$(bindir)/pkgclean
# maintpkg
$(INSTALL_PROGRAM) scripts/maintpkg $(DESTDIR)$(bindir)/maintpkg
# pip2arch
$(INSTALL_PROGRAM) scripts/pip2arch/pip2arch.py $(DESTDIR)$(bindir)/pip2arch
uninstall:
rm -Rf $(DESTDIR)$(sharedir)
rm $(DESTDIR)$(bindir)/{newpkg,spec2arch,pkgconflict,whoneeds,pkgclean,pip2arch}
rm -Rf $(DESTDIR)$(confdir)/pkgtools
rm $(DESTDIR)$(mandir)/man8/spec2arch.8
rm $(DESTDIR)$(mandir)/man5/spec2arch.conf.5