* Add debianrepo target
* Change the debian target to build binary and source, add a debian-binary target
This commit is contained in:
25
build.xml
25
build.xml
@ -37,6 +37,8 @@
|
||||
<echo message=" javadoc: generate javadoc for the entire project into ./build/javadoc" />
|
||||
<echo message=" slackpkg: generate Slackware packages in ./Slackware/i2p and ./Slackware/i2p-base" />
|
||||
<echo message=" debianhowto: instructions on building Debian packages" />
|
||||
<echo message=" debian: generate Debian packages (source + binary)" />
|
||||
<echo message=" debianrepo: build a Debian repository (reprepro required)" />
|
||||
<echo message=" updaterWithDesktopgui: tar the built files and desktopgui in an i2pupdate.zip" />
|
||||
<echo message=" pkgWithDesktopgui: distclean then package everything up with the desktopgui" />
|
||||
<echo message=" distWithDesktopgui: pkgWithDesktopgui and javadoc" />
|
||||
@ -212,7 +214,13 @@
|
||||
</target>
|
||||
<target name="distclean" depends="clean">
|
||||
<delete dir="debian/tmp" />
|
||||
<delete dir="debian/repo" />
|
||||
<delete dir="debian/db" />
|
||||
<delete file="debian/files" />
|
||||
<delete file="debian/build" />
|
||||
<delete>
|
||||
<fileset dir=".." includes="i2p_*.tar.gz,i2p_*.deb,i2p_*.dsc,i2p_*.changes" />
|
||||
</delete>
|
||||
<ant dir="core/java/" target="distclean" />
|
||||
<ant dir="router/java/" target="distclean" />
|
||||
<ant dir="apps/ministreaming/java/" target="distclean" />
|
||||
@ -889,6 +897,20 @@
|
||||
</target>
|
||||
|
||||
<target name="debian">
|
||||
<!-- same as debian-binary + debian-source, but only one build needed -->
|
||||
<echo message="Did you update the version in these files?" />
|
||||
<exec executable="ls" failonerror="true">
|
||||
<arg value="-l" />
|
||||
<arg value="debian/changelog" />
|
||||
</exec>
|
||||
<echo message="====================" />
|
||||
<!-- bundle the 20MB jetty 5 lib since there probably isn't a deb for it -->
|
||||
<ant dir="apps/jetty" target="verifyJettylib" />
|
||||
<exec executable="dpkg-buildpackage" failifexecutionfails="true">
|
||||
<arg value="-I_MTN" />
|
||||
</exec>
|
||||
</target>
|
||||
<target name="debian-binary">
|
||||
<!-- binary only -->
|
||||
<echo message="Did you update the version in these files?" />
|
||||
<exec executable="ls" failonerror="true">
|
||||
@ -914,6 +936,9 @@
|
||||
<arg value="-I_MTN" />
|
||||
</exec>
|
||||
</target>
|
||||
<target name="debianrepo" depends="debian">
|
||||
<exec dir="debian" executable="./makerepo.sh" />
|
||||
</target>
|
||||
|
||||
<!-- the following are appened to help build barebone portable version,
|
||||
none of the above is modified for this purpose -->
|
||||
|
38
debian/makerepo.sh
vendored
Executable file
38
debian/makerepo.sh
vendored
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
# This script creates a Debian repository in ${DIR} using the reprepro tool.
|
||||
# The packages are signed with the key referenced in the newest changelog entry.
|
||||
|
||||
cd $(dirname $0)
|
||||
DIR=./repo
|
||||
CONFDIR=conf
|
||||
CONFFILE=${CONFDIR}/distributions
|
||||
|
||||
SIGNER=`parsechangelog --file changelog | grep Maintainer | cut -d: -f2`
|
||||
SIGNER=${SIGNER//^ /}
|
||||
SIGNER=`echo ${SIGNER} | cut -d\ -f1`
|
||||
KEYID=`gpg --list-keys "${SIGNER}" | cut -d: -f2 | grep -w pub | cut -d/ -f2 | cut -d\ -f1`
|
||||
echo Using signing key: ${SIGNER}
|
||||
echo Key ID: ${KEYID}
|
||||
|
||||
# creating the reprepro config file dynamically allows us to specify the signer
|
||||
mkdir -p ${CONFDIR}
|
||||
echo "Origin: I2P" > ${CONFFILE}
|
||||
echo "Label: I2P Debian Repository" >> ${CONFFILE}
|
||||
echo "Suite: all" >> ${CONFFILE}
|
||||
echo "Codename: all" >> ${CONFFILE}
|
||||
echo "Architectures: i386 amd64 source" >> ${CONFFILE}
|
||||
echo "Components: main" >> ${CONFFILE}
|
||||
echo "SignWith: ${SIGNER}" >> ${CONFFILE}
|
||||
|
||||
# create the repository
|
||||
echo Building the repository...
|
||||
reprepro --ask-passphrase --outdir ${DIR} includedeb all ../../i2p_*.deb
|
||||
reprepro --ask-passphrase --outdir ${DIR} include all ../../i2p_*.changes
|
||||
|
||||
# export the public key
|
||||
gpg --armor --export ${SIGNER} > ${DIR}/0x${KEYID}.asc
|
||||
|
||||
# remove the config file created above
|
||||
echo Cleaning up...
|
||||
rm -f ${CONFFILE}
|
||||
rmdir ${CONFDIR}
|
@ -1,3 +1,9 @@
|
||||
2010-11-06 HungryHobo
|
||||
* New Ant target: debianrepo
|
||||
* Rename debian target to debian-binary
|
||||
* New debian target generates binary and source packages
|
||||
* Debian tweaks
|
||||
|
||||
2010-11-03 zzz
|
||||
* Merge and snark fixups
|
||||
|
||||
|
Reference in New Issue
Block a user