source: debian/repack.sh @ 1fbf188

Last change on this file since 1fbf188 was e2f048b, checked in by zzz <zzz@…>, 4 years ago

Debian:
Add dependency on libjetty8-java and libservlet3.0-java packages
Remove those binaries in debian builds
Prep for dependency on libservlet2.5-java package
Prep for dependency on libtomcat6-java package
Prep for dependency on libtomcat7-java package
Prep for dependency on libjakarta-taglibs-standard-java package
Prep for dependency on libjstl1.1-java package
Add build properties for building with packages
Rework of apps/jetty/build.xml for building with packages
Redefine debian/ as the files for the jessie build
Make debian-alt directories for ubuntu builds
Move debian/changelog to debian-alt/trusty/changelog
Move debian-alt/jessie/changelog to debian/changelog
Add apps/jetty/jettylib/jsp-api.jar to classpath for jsp builds

  • Property mode set to 100755
File size: 1.6 KB
Line 
1#!/bin/sh
2
3# Strip out binaries from the official upstream I2P source tarballs that are
4# not required to build the Debian packages.
5
6# Script mostly borrowed from Raphael Geissert's dfsg-repack.sh
7
8
9set -e
10
11if [ ! -f "$3" ] && [ ! -f "$1" ]; then
12    echo "ERROR: This script must be run via uscan or by manually specifying the input tarball." >&2
13    exit 1
14fi
15
16tarball=
17
18[ -f "$3" ] && tarball="$3"
19[ -z "$tarball" -a -f "$1" ] && tarball="$1"
20
21fname=$(basename "$tarball" .bz2)
22tarball=$(readlink -f "$tarball")
23
24tdir=$(mktemp -d)
25trap '[ ! -d "$tdir" ] || rm -r "$tdir"' EXIT
26
27cp -f ${tarball} "$tarball.bkp"
28echo "Filtering tarball contents..."
29bzcat "$tarball" | tar --wildcards --delete '*/installer/lib/*' \
30                        --delete '*/Slackware/*' \
31                        --delete '*/debian-alt/*' \
32                        --delete '*/installer/resources/geoip.txt' \
33                        --delete '*/installer/resources/geoipv6.dat.gz' \
34                        --delete '*/apps/jetty/apache-tomcat/*' \
35                        --delete '*/apps/jetty/apache-tomcat-deployer/*' \
36                        --delete '*/apps/jetty/jetty-distribution-*/*' \
37                        --delete '*/apps/susidns/src/WEB-INF/lib/jstl.jar' \
38                        --delete '*/apps/susidns/src/WEB-INF/lib/standard.jar' \
39                        --delete '*/debian/*' > "$tdir/${fname}"
40
41echo "Compressing filtered tarball..."
42bzip2 -9 "$tdir/${fname}"
43
44repackedtarball=$(echo $tarball|sed -e 's/i2psource/i2p/' -e 's/\.orig\.tar\.bz2/+repack.orig.tar.bz2/')
45mv "$tdir/${fname}.bz2" "$repackedtarball"
46echo "Repacked tarball saved to $repackedtarball."
Note: See TracBrowser for help on using the repository browser.