source: debian/rules @ 0000e4f

Last change on this file since 0000e4f was 0000e4f, checked in by kytv <kytv@…>, 9 years ago

Debian: Ship custom router.config to disable updates via the I2P router. Updates, to keep with Debian policy, must be done via the package manager.

  • Property mode set to 100755
File size: 3.4 KB
Line 
1#!/usr/bin/make -f
2
3# Quoting Policy version 3.9.2.0, 2011-04-07 section 4.9:
4
5# /start quote
6# For some packages, notably ones where the same source tree is compiled in
7# different ways to produce two binary packages, the build target does not make
8# much sense. For these packages it is good enough to provide two (or more)
9# targets (build-a and build-b or whatever) for each of the ways of building the
10# package, and a build target that does nothing. The binary target will have to
11# build the package in each of the possible ways and make the binary package out
12# of each.
13# ...
14# When a package has a configuration and build routine which takes a long time,
15# or when the makefiles are poorly designed, or when build needs to run clean
16# first, it is a good idea to touch build when the build process is complete.
17# This will ensure that if debian/rules build is run again it will not rebuild
18# the whole program.
19# /end quote
20
21# Since that fits building I2P very well, we override the build target.
22#
23
24build:
25        @echo 'The build target is disabled. Use the appropriate binary target.'
26
27JAVA_HOME=/usr/lib/jvm/default-java
28I2P=$(CURDIR)/pkg-temp
29export JAVA_HOME I2P
30#export DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
31
32%:
33        dh $@ --with quilt
34
35clean: createcopyright
36
37override_dh_auto_clean:
38        dh_auto_clean
39        ant distclean
40        # The next line is used by KYTV
41        # when building from source packages
42        #rm -f apps/jetty/jetty-5.1.15.tgz
43        rm -f core/c/jbigi/*.[s]o
44        rm -rf core/c/jcpuid/lib/
45        debconf-updatepo
46
47override_dh_auto_build:
48
49binary-indep: build-indep
50build-indep:
51        dh_prep
52        # The next line is used by KYTV when building from source packages
53        #[ -r jetty/jetty-5.1.15.tgz ] && ln -sf $(CURDIR)/jetty/jetty-5.1.15.tgz $(CURDIR)/apps/jetty/jetty-5.1.15.tgz
54        ant preppkg-linux javadoc
55        echo router.updateDisabled=true > $(I2P)/router.config
56        mv build/javadoc build/api
57        mv $(I2P)/runplain.sh $(I2P)/i2prouter-nowrapper
58        -cp -fv /usr/share/tor/geoip $(CURDIR)/pkg-temp/geoip/geoip.txt
59       
60
61binary-arch: build-arch
62build-arch:
63        # build jbigi
64        cd $(CURDIR)/core/c/jbigi && ./mbuild_jbigi.sh dynamic
65        # build jcpuid
66        cd $(CURDIR)/core/c/jcpuid && ./build.sh
67
68binary: binary-arch binary-indep
69
70createcopyright:
71        @echo " *** Creating debian/copyright*** "
72        @rm -f $(CURDIR)/debian/copyright
73        @/bin/echo -e "This package was Debianized by kytv <killyourtv@i2pmail.org>" >> $(CURDIR)/debian/copyright
74        @/bin/echo -e "Sun, 23 Jan 2011 20:26:51 +0000" >> $(CURDIR)/debian/copyright
75        @/bin/echo -e "\nIt was downloaded from http://www.i2p2.de" >> $(CURDIR)/debian/copyright
76        @/bin/echo -e "\nI2P is tracked upstream using the Monotone VCS" >> $(CURDIR)/debian/copyright
77        @/bin/echo -e "Complete information on fetching the source with monotone can be found" >> $(CURDIR)/debian/copyright
78        @/bin/echo -e "at http://www.i2p2.de/newdevelopers#getting-the-i2p-code\n\n\n" >> $(CURDIR)/debian/copyright
79        @/bin/cat $(CURDIR)/LICENSE.txt >> $(CURDIR)/debian/copyright
80
81
82override_dh_compress:
83        dh_compress -X.xsl -X.xml
84
85override_dh_installchangelogs:
86        dh_installchangelogs history.txt
87
88override_dh_installdocs:
89        dh_installdocs -pi2p -plibjbigi-jni --link-doc=i2p-router
90        dh_installdocs --remaining-packages
91
92override_dh_dhlibdeps:
93        dh_shlibdeps -llibjbigi-jni debian/libjbigi-jni/usr/lib/jni/*.so
94
95#override_dh_installinit:
96#       dh_installinit -r
97
98get-orig-source:
99        uscan --verbose --rename --destdir $(CURDIR)/.. --watchfile debian/watch --force-download
Note: See TracBrowser for help on using the repository browser.