source: debian/rules @ 7897df5

Last change on this file since 7897df5 was 7897df5, checked in by HungryHobo <HungryHobo@…>, 10 years ago

Improve the Debian copyright file, see http://lists.debian.org/debian-legal/2003/12/msg00194.html

  • Property mode set to 100755
File size: 2.1 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        # Create the Debian copyright file, move the licenses dir,
28        # and delete all license files that are already in /usr/share/common-licenses/
29        cat debian/copyright.part1 LICENSE.txt > debian/tmp/usr/share/doc/i2p/copyright
30        mv debian/tmp/usr/lib/i2p/licenses debian/tmp/usr/share/doc/i2p
31        rm debian/tmp/usr/lib/i2p/LICENSE.txt
32        rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-Apache2.0.txt
33        rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-GPLv2.txt
34        rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-LGPLv2.1.txt
35
36binary: build
37        mkdir -p debian/tmp/DEBIAN
38        dpkg-gencontrol
39        cp -a debian/scripts/postinst debian/scripts/postrm debian/scripts/prerm debian/tmp/DEBIAN
40        dpkg-deb -b debian/tmp ..
41
42clean:
43        rm -f debian/build
44        rm -rf debian/tmp/
45        ant distclean
46        @exit 0
47
48get-orig-source:
49        wget ${SOURCEURL}
Note: See TracBrowser for help on using the repository browser.