blob: 44825a796b2210052a02045df55a1f96db0c3992 (
plain)
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
|
NDPI_HOME=$(PWD)/../..
NDPI_BUILD="$(realpath ${NDPI_HOME}/packages/ubuntu)"
ndpi:
\rm -rf ./debian/ndpi-tmp ./debian/ndpi-dev-tmp ./debian/ndpi ./debian/ndpi-dev
mkdir -p ./debian/ndpi-tmp ./debian/ndpi-dev-tmp
mkdir -p ./debian/ndpi-tmp/usr/lib ./debian/ndpi-tmp/usr/bin ./debian/ndpi-tmp/usr/share/ndpi
mkdir -p ./debian/ndpi-dev-tmp/usr/lib ./debian/ndpi-dev-tmp/usr/include/ndpi ./debian/ndpi-dev-tmp/usr/lib/pkgconfig
cd ${NDPI_HOME}; ./autogen.sh; ./configure; $(MAKE)
cp $(NDPI_HOME)/src/lib/libndpi.so.@NDPI_VERS@ ./debian/ndpi-tmp/usr/lib/
cp $(NDPI_HOME)/lists/public_suffix_list.dat ./debian/ndpi-tmp/usr/share/ndpi/
cd ./debian/ndpi-tmp/usr/lib/; ln -s libndpi.so.@NDPI_VERS@ libndpi.so; cd -
cd ./debian/ndpi-tmp/usr/lib/; ln -s libndpi.so.@NDPI_VERS@ libndpi.so.@MAJOR_RELEASE@; cd -
cp $(NDPI_HOME)/src/lib/libndpi.a ./debian/ndpi-dev-tmp/usr/lib/
cp $(NDPI_HOME)/example/ndpiReader ./debian/ndpi-tmp/usr/bin/
cp $(NDPI_HOME)/src/include/*.h ./debian/ndpi-dev-tmp/usr/include/ndpi/
cp $(NDPI_HOME)/libndpi.pc ./debian/ndpi-dev-tmp/usr/lib/pkgconfig/
-rm -fr ./debian/ndpi-dev-tmp/usr/include/ndpi/ndpi_win32.h*
@echo
@find ./debian/ndpi-tmp -name "*~" -exec /bin/rm {} ';'
@find ./debian/ndpi-dev-tmp -name "*~" -exec /bin/rm {} ';'
dpkg-buildpackage -rfakeroot -d -us -uc
@SIGN_CMD@ --sign builder -k D1EB60BE ../ndpi*deb
@\rm -f ../ndpi*dsc ../ndpi*.gz ../ndpi*changes
@/bin/mv ../ndpi*deb .
@echo
@echo "Package built."
@/bin/ls ndpi*deb
@echo "-------------------------------"
-dpkg --contents ndpi_*.deb
@echo "-------------------------------"
@echo "-------------------------------"
-dpkg --contents ndpi-dev_*.deb
@echo "-------------------------------"
distclean:
-cd ${NDPI_HOME} && $(MAKE) distclean
install:
cd ${NDPI_HOME}; $(MAKE) install DESTDIR="${NDPI_BUILD}/debian/tmp" AM_UPDATE_INFO_DIR=no
clean:
-cd ${NDPI_HOME} && $(MAKE) clean
-rm -rf *~ *deb ./usr ./debian/ndpi ./debian/ndpi-dev ./debian/ndpi ./debian/ndpi-dev
|