source: debian/rules @ 5d9a7b9

Last change on this file since 5d9a7b9 was 5d9a7b9, checked in by HungryHobo <HungryHobo@…>, 11 years ago

Add changelog to .deb

  • Property mode set to 100755
File size: 2.3 KB
Line 
1#!/usr/bin/make -f
2
3VERSION=`grep String\ VERSION core/java/src/net/i2p/CoreVersion.java | cut -d\" -f2`
4SOURCEURL=http://mirror.i2p2.de/i2psource_${VERSION}.tar.bz2
5
6build:
7        ant preppkg-linux-only
8        mkdir -p debian/tmp/usr/lib
9        mkdir -p debian/tmp/etc/init.d
10        cp -a debian/scripts/init debian/tmp/etc/init.d/i2p
11        cp -a pkg-temp debian/tmp/usr/lib/i2p
12        chmod +x debian/tmp/usr/lib/i2p/postinstall.sh
13        sed 's|$$INSTALL_PATH|/usr/lib/i2p|g' debian/tmp/usr/lib/i2p/wrapper.config > debian/tmp/usr/lib/i2p/a
14        sed 's|$$SYSTEM_java_io_tmpdir|/tmp|g' debian/tmp/usr/lib/i2p/a > debian/tmp/usr/lib/i2p/wrapper.config
15        mkdir -p debian/tmp/usr/bin
16        sed 's|%INSTALL_PATH|/usr/lib/i2p|g' debian/tmp/usr/lib/i2p/eepget > debian/tmp/usr/lib/i2p/a
17        mv debian/tmp/usr/lib/i2p/a debian/tmp/usr/lib/i2p/eepget
18        ln -s /usr/lib/i2p/eepget debian/tmp/usr/bin/eepget
19        sed 's|%INSTALL_PATH|/usr/lib/i2p|g' debian/tmp/usr/lib/i2p/runplain.sh > debian/tmp/usr/lib/i2p/a
20        sed 's|%SYSTEM_java_io_tmpdir|/tmp|g' debian/tmp/usr/lib/i2p/a > debian/tmp/usr/lib/i2p/runplain.sh
21        sed 's|%INSTALL_PATH|/usr/lib/i2p|g' debian/tmp/usr/lib/i2p/i2prouter > debian/tmp/usr/lib/i2p/a
22        sed 's|%SYSTEM_java_io_tmpdir|/tmp|g' debian/tmp/usr/lib/i2p/a > debian/tmp/usr/lib/i2p/i2prouter
23        ln -s /usr/lib/i2p/i2prouter debian/tmp/usr/bin/i2prouter
24        rm debian/tmp/usr/lib/i2p/a
25        touch debian/build
26        mkdir -p debian/tmp/usr/share/doc/i2p
27
28        # Create the Debian copyright file, move the licenses dir,
29        # and delete all license files that are already in /usr/share/common-licenses/
30        cat debian/copyright.part1 LICENSE.txt > debian/tmp/usr/share/doc/i2p/copyright
31        mv debian/tmp/usr/lib/i2p/licenses debian/tmp/usr/share/doc/i2p
32        rm debian/tmp/usr/lib/i2p/LICENSE.txt
33        rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-Apache2.0.txt
34        rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-GPLv2.txt
35        rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-LGPLv2.1.txt
36
37        # changelog
38        gzip -9c history.txt > debian/tmp/usr/share/doc/i2p/changelog.gz
39        gzip -9c debian/changelog > debian/tmp/usr/share/doc/i2p/changelog.Debian.gz
40
41binary: build
42        mkdir -p debian/tmp/DEBIAN
43        dpkg-gencontrol
44        cp -a debian/scripts/postinst debian/scripts/postrm debian/scripts/prerm debian/tmp/DEBIAN
45        dpkg-deb -b debian/tmp ..
46
47clean:
48        rm -f debian/build
49        rm -rf debian/tmp/
50        ant distclean
51        @exit 0
52
53get-orig-source:
54        wget ${SOURCEURL}
Note: See TracBrowser for help on using the repository browser.