Changeset ae101f6 for debian


Ignore:
Timestamp:
Nov 12, 2010 10:57:59 PM (10 years ago)
Author:
HungryHobo <HungryHobo@…>
Branches:
master
Children:
7b5e331, c5a6c5d4
Parents:
98f559c
Message:

Reorganize the Debian directory structure to conform to their packaging policy. This brings the number of Lintian errors+warning
s down from 383 to 16.

Location:
debian
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • debian/README.txt

    r98f559c rae101f6  
    33- A new user i2psvc (a lot of people already have an i2p user)
    44- i2psvc home is /var/lib/i2p
    5 - $I2P is /usr/lib/i2p, owned by i2psvc
     5- $I2P is /usr/share/i2p, owned by i2psvc
    66- i2psvc router directory is /var/lib/i2p/i2p-config (hack in WorkingDir.java)
    77- i2p daemon script in /etc/init.d/i2p
  • debian/rules

    r98f559c rae101f6  
    1919endif
    2020        ant preppkg-linux-only
    21         mkdir -p debian/tmp/usr/lib
     21       
    2222        mkdir -p debian/tmp/etc/init.d
     23        mkdir -p debian/tmp/etc/i2p
     24        mkdir -p debian/tmp/usr/share/i2p/lib
     25        mkdir -p debian/tmp/usr/share/doc/i2p
     26        mkdir -p debian/tmp/usr/lib/i2p
     27        mkdir -p debian/tmp/usr/bin
     28       
    2329        cp -a debian/scripts/init debian/tmp/etc/init.d/i2p
    24         cp -a pkg-temp debian/tmp/usr/lib/i2p
    25         sed 's|$$INSTALL_PATH|/usr/lib/i2p|g' debian/tmp/usr/lib/i2p/wrapper.config > debian/tmp/usr/lib/i2p/a
    26         sed 's|$$SYSTEM_java_io_tmpdir|/tmp|g' debian/tmp/usr/lib/i2p/a > debian/tmp/usr/lib/i2p/wrapper.config
    27         mkdir -p debian/tmp/usr/bin
    28         sed 's|%INSTALL_PATH|/usr/lib/i2p|g' debian/tmp/usr/lib/i2p/eepget > debian/tmp/usr/lib/i2p/a
    29         mv debian/tmp/usr/lib/i2p/a debian/tmp/usr/lib/i2p/eepget
    30         ln -s /usr/lib/i2p/eepget debian/tmp/usr/bin/eepget
    31         chmod +x debian/tmp/usr/lib/i2p/eepget
    32         sed 's|%INSTALL_PATH|/usr/lib/i2p|g' debian/tmp/usr/lib/i2p/runplain.sh > debian/tmp/usr/lib/i2p/a
    33         sed 's|%SYSTEM_java_io_tmpdir|/tmp|g' debian/tmp/usr/lib/i2p/a > debian/tmp/usr/lib/i2p/runplain.sh
    34         sed 's|%INSTALL_PATH|/usr/lib/i2p|g' debian/tmp/usr/lib/i2p/i2prouter > debian/tmp/usr/lib/i2p/a
    35         sed 's|%SYSTEM_java_io_tmpdir|/tmp|g' debian/tmp/usr/lib/i2p/a > debian/tmp/usr/lib/i2p/i2prouter
    36         ln -s /usr/lib/i2p/i2prouter debian/tmp/usr/bin/i2prouter
    37         chmod +x debian/tmp/usr/lib/i2p/i2prouter
    38         rm debian/tmp/usr/lib/i2p/a
    39         touch debian/build
    40         mkdir -p debian/tmp/usr/share/doc/i2p
    4130       
    42         @# copy wrapper files
    43         cp ${wrapperpath}/libwrapper.so debian/tmp/usr/lib/i2p/lib/
    44         cp ${wrapperpath}/wrapper.jar debian/tmp/usr/lib/i2p/lib/
    45         cp ${wrapperpath}/i2psvc debian/tmp/usr/lib/i2p/
    46         chmod +x debian/tmp/usr/lib/i2p/i2psvc
    47 
    48         @# Create the Debian copyright file, move the licenses dir,
    49         @# and delete all license files that are already in /usr/share/common-licenses/
     31        @# copy config templates to /etc/i2p
     32        cp -a pkg-temp/blocklist.txt debian/tmp/etc/i2p/
     33        cp -a pkg-temp/clients.config debian/tmp/etc/i2p/
     34        cp -a pkg-temp/hosts.txt debian/tmp/etc/i2p/
     35        cp -a pkg-temp/i2psnark.config debian/tmp/etc/i2p/
     36        cp -a pkg-temp/i2ptunnel.config debian/tmp/etc/i2p/
     37        cp -a pkg-temp/jetty-i2psnark.xml debian/tmp/etc/i2p/
     38        cp -a pkg-temp/systray.config debian/tmp/etc/i2p/
     39       
     40        @# copy architecture independent files to /usr/share/i2p and create symlinks to /etc/i2p/
     41        ln -s /etc/i2p/blocklist.txt debian/tmp/usr/share/i2p/blocklist.txt
     42        ln -s /etc/i2p/clients.config debian/tmp/usr/share/i2p/clients.config
     43        ln -s /etc/i2p/hosts.txt debian/tmp/usr/share/i2p/hosts.txt
     44        ln -s /etc/i2p/i2psnark.config debian/tmp/usr/share/i2p/i2psnark.config
     45        ln -s /etc/i2p/i2ptunnel.config debian/tmp/usr/share/i2p/i2ptunnel.config
     46        ln -s /etc/i2p/jetty-i2psnark.xml debian/tmp/usr/share/i2p/jetty-i2psnark.xml
     47        ln -s /etc/i2p/systray.config debian/tmp/usr/share/i2p/systray.config
     48        ln -s /etc/i2p/wrapper.config debian/tmp/usr/share/i2p/wrapper.config
     49        cp -a pkg-temp/docs debian/tmp/usr/share/i2p/
     50        cp -a pkg-temp/eepsite debian/tmp/usr/share/i2p/
     51        cp -a pkg-temp/geoip debian/tmp/usr/share/i2p/
     52        cp -a pkg-temp/lib/*.jar debian/tmp/usr/share/i2p/lib/
     53        cp -a pkg-temp/scripts debian/tmp/usr/share/i2p/
     54        cp -a pkg-temp/webapps debian/tmp/usr/share/i2p/
     55        cp -a pkg-temp/licenses debian/tmp/usr/share/doc/i2p/
     56        @# Create the Debian copyright file
    5057        cat debian/copyright.part1 LICENSE.txt > debian/tmp/usr/share/doc/i2p/copyright
    51         mv debian/tmp/usr/lib/i2p/licenses debian/tmp/usr/share/doc/i2p
    52         rm debian/tmp/usr/lib/i2p/LICENSE.txt
     58        @# delete all license files that are already in /usr/share/common-licenses/
    5359        rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-Apache2.0.txt
    5460        rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-GPLv2.txt
    5561        rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-LGPLv2.1.txt
    5662
     63        @# copy wrapper files to /usr/lib/i2p (including wrapper.jar because it is architecture dependent)
     64        cp ${wrapperpath}/libwrapper.so debian/tmp/usr/lib/i2p/
     65        cp ${wrapperpath}/wrapper.jar debian/tmp/usr/lib/i2p/
     66        cp ${wrapperpath}/i2psvc debian/tmp/usr/lib/i2p/
     67        chmod +x debian/tmp/usr/lib/i2p/i2psvc
     68
     69        @# copy remaining executables to /usr/bin, replace INSTALL_PATH and SYSTEM_java_io_tmpdir
     70        sed 's|%INSTALL_PATH|/usr/share/i2p|g' pkg-temp/eepget > debian/tmp/usr/bin/eepget
     71        chmod +x debian/tmp/usr/bin/eepget
     72        cat pkg-temp/i2prouter | \
     73            sed 's|$$I2P/i2psvc|/usr/lib/i2p/i2psvc|g' | \
     74            sed 's|$$I2P/wrapper.config|/etc/i2p/wrapper.config|g' | \
     75            sed 's|%INSTALL_PATH|/usr/share/i2p|g' | \
     76            sed 's|%SYSTEM_java_io_tmpdir|/tmp|g' > debian/tmp/usr/bin/i2prouter
     77        chmod +x debian/tmp/usr/bin/i2prouter
     78        @# The first 4 sed commands each replace the first \$INSTALL_PATH that hasn't been replaced
     79        @# wrapper.java.classpath.1 --> /usr/share/i2p/lib/*.jar:/usr/lib/i2p/wrapper.jar
     80        @# wrapper.java.library.path.1 --> /usr/lib/i2p
     81        @# wrapper.java.library.path.2 --> /usr/lib/i2p
     82        @# i2p.dir.base --> /usr/share/i2p
     83        cat pkg-temp/wrapper.config | \
     84            sed '0,/$$INSTALL_PATH\/lib\/\*\.jar/s//\/usr\/share\/i2p\/lib\/*.jar\nwrapper.java.classpath.2=\/usr\/lib\/i2p\/wrapper.jar/' | \
     85            sed '0,/$$INSTALL_PATH/s//\/usr\/lib\/i2p/' | \
     86            sed '0,/$$INSTALL_PATH/s//\/usr\/lib\/i2p/' | \
     87            sed '0,/$$INSTALL_PATH/s//\/usr\/share\/i2p/' | \
     88            sed 's|$$SYSTEM_java_io_tmpdir|/tmp|g' > debian/tmp/etc/i2p/wrapper.config
     89        @# now do runplain.sh
     90        cat pkg-temp/runplain.sh | \
     91            sed 's|-Djava.library.path=$$I2P:$$I2P/lib|-Djava.library.path=/usr/lib/i2p|g' | \
     92            sed 's|%INSTALL_PATH|/usr/share/i2p|g' | \
     93            sed 's|%SYSTEM_java_io_tmpdir|/tmp|g' > debian/tmp/usr/share/i2p/runplain.sh
     94        chmod +x debian/tmp/usr/share/i2p/runplain.sh
     95       
     96        touch debian/build
     97       
    5798        @# changelog
    5899        gzip -9c history.txt > debian/tmp/usr/share/doc/i2p/changelog.gz
     
    62103        mkdir -p debian/tmp/DEBIAN
    63104        dpkg-gencontrol
    64         cp -a debian/scripts/postinst debian/scripts/postrm debian/scripts/prerm debian/tmp/DEBIAN
     105        cp -a debian/scripts/postinst debian/scripts/postrm debian/scripts/prerm debian/conffiles debian/tmp/DEBIAN
    65106        dpkg-deb -b debian/tmp ..
    66107
  • debian/scripts/init

    r98f559c rae101f6  
    1515
    1616I2P () {
    17         su i2psvc -c "/usr/lib/i2p/i2prouter $1"
     17        su i2psvc -c "/usr/bin/i2prouter $1"
    1818}
    1919
  • debian/scripts/postinst

    r98f559c rae101f6  
    11#!/bin/sh
    22SVCHOME=/var/lib/i2p
    3 I2P=/usr/lib/i2p
     3I2P=/usr/share/i2p
    44I2PUSER=i2psvc
    55
  • debian/scripts/postrm

    r98f559c rae101f6  
    1010# if somebody did updates in-network, there may be new files that dpkg
    1111# doesn't know about, so just to be sure
    12 I2P=/usr/lib/i2p
     12I2P=/usr/share/i2p
    1313rm -rf $I2P
    1414
  • debian/scripts/prerm

    r98f559c rae101f6  
    99
    1010# dpkg doesn't know about these files, they were copied out of jbigi.jar by the router
    11 rm -f $I2P/libjbigi.so $I2P/libjcpuid.so
     11LIB=/usr/lib/i2p
     12rm -f $LIB/libjbigi.so $LIB/libjcpuid.so
    1213
    1314# the home directory for the i2p daemon
Note: See TracChangeset for help on using the changeset viewer.