/
Makefile
43 lines (34 loc) · 1.22 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
CHECKINSTALLOPTIONS = --pkgname=org.bigbrothercctv.bigbrother -A all --pkggroup=Video \
--pkglicense=GPL --nodoc --maintainer='bigbrothercctv.org' \
--requires=ffmpeg,python
INSTALLDIR = /usr/local/bigbrother
default:
echo "Run make deb|rpm|pkgng|clean"
installbinary:
mkdir $(INSTALLDIR)
cp ./*.sh $(INSTALLDIR)
cp ./bigbrotherd $(INSTALLDIR)
cp -R ./mirrorwebroot $(INSTALLDIR)
cp ./bblogger $(INSTALLDIR)
cp ./bigbrother.conf $(INSTALLDIR)
cp ./bigbrother_camera.conf $(INSTALLDIR)
cp ./bigbrotherd.service /etc/systemd/system
cp ./License.txt $(INSTALLDIR)
cp ./README.txt $(INSTALLDIR)
#Use checkinstall to make a .deb
deb:
#Use checkinstall to make a deb package
checkinstall -D --install=no $(CHECKINSTALLOPTIONS) make installbinary
rpm:
tar cf ./bigbrother.tar ./*.sh ./bigbrotherd ./mirrorwebroot ./bblogger ./bigbrother.conf ./bigbrother_camera.conf ./bigbrotherd.service ./License.txt ./README.txt
gzip ./bigbrother.tar
mv ./bigbrother.tar.gz ./RPM/SOURCES/org.bigbrothercctv.bigbrother.tar.gz
rpmbuild -v -bb --clean ./RPM/SPECS/bigbrother.spec
echo "RPM is in ./RPM/RPMS/noarch/"
pkgng:
pkg create -M ./+MANIFEST -r .
clean:
rm -rf ./RPM/RPMS/*
rm -rf ./*.deb
rm -rf ./RPM/SOURCES/*
rm -rf ./*.txz