forked from KeithDHedger/LFSPkg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (43 loc) · 1.59 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
PREFIX="/usr"
DESTDIR=
PKGNAME="LFSPkg"
PROGRAM="lfspkg"
HELPER="finddepends"
HELPERCODE="main.cpp"
FUNCTIONS="LFSFunctions"
MANPAGE="${PROGRAM}.1"
RCFILE="lfspkg.rc"
SETUP="LFSPkgSetUp"
all:
g++ -o $(HELPER) $(HELPERCODE)
clean:
rm $(HELPER)||true
install:
mkdir -vp $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/$(PKGNAME) $(DESTDIR)$(PREFIX)/share/man/man1 $(DESTDIR)/etc||true
g++ -o $(HELPER) $(HELPERCODE)
cp $(HELPER) $(PROGRAM) $(DESTDIR)$(PREFIX)/bin
cp $(MANPAGE) $(DESTDIR)$(PREFIX)/share/man/man1
cp $(FUNCTIONS) $(SETUP) $(DESTDIR)$(PREFIX)/share/$(PKGNAME)
cp -n $(RCFILE) $(DESTDIR)/etc/$(RCFILE)
@echo "**************************************************************"
@echo "Now set your package options in the file /etc/lfspkg.rc"
@echo "Either manually or by using 'lfspkg --setup'"
@echo "An example rc file is included in $(PREFIX)/share/$(PKGNAME)"
@echo
@echo "See the manpage for details, but you should set at least:"
@echo "OUTPUT and SOURCEARCHIVES"
@echo
@echo "You should also download the buildscripts from here:"
@echo "https://github.com/KeithDHedger/LFSPkgBuilds"
@echo "Place LFSPkgBuildScripts and LFSScripts in / ."
@echo "If you place them elsewhere set BUILDSCRIPTS in /etc/lfspkg.rc"
@echo
@echo "After downloading the build scripts build the database like so:"
@echo "SIMPLEUPDATE=0 lfspkg -U"
@echo
@echo "**************************************************************"
uninstall:
rm $(DESTDIR)$(PREFIX)/bin/$(HELPER)
rm $(DESTDIR)$(PREFIX)/bin/$(PROGRAM)
rm $(DESTDIR)$(PREFIX)/share/man/man1/$(MANPAGE)
rm -r $(DESTDIR)$(PREFIX)/share/$(PKGNAME)