source: debian/makerepo.sh @ c3aa84f9

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

Run includedeb and include on each file individually, reprepro can't do multiple files

  • Property mode set to 100755
File size: 1.4 KB
Line 
1#!/bin/bash
2# This script creates a Debian repository in ${DIR} using the reprepro tool.
3# The packages are signed with the key referenced in the newest changelog entry.
4
5set -e
6
7cd $(dirname $0)
8DIR=./repo
9CONFDIR=conf
10CONFFILE=${CONFDIR}/distributions
11
12SIGNER=`parsechangelog --file changelog | grep Maintainer | cut -d: -f2`
13SIGNER=${SIGNER//^ /}
14SIGNER=`echo ${SIGNER} | cut -d\  -f1`
15KEYID=`gpg --list-keys "${SIGNER}" | cut -d: -f2 | grep -w pub | cut -d/ -f2 | cut -d\  -f1`
16echo Using signing key: ${SIGNER}
17echo Key ID: ${KEYID}
18
19# creating the reprepro config file dynamically allows us to specify the signer
20mkdir -p ${CONFDIR}
21echo "Origin: I2P" > ${CONFFILE}
22echo "Label: I2P Debian Repository" >> ${CONFFILE}
23echo "Suite: all" >> ${CONFFILE}
24echo "Codename: all" >> ${CONFFILE}
25echo "Architectures: i386 amd64 source" >> ${CONFFILE}
26echo "Components: main" >> ${CONFFILE}
27echo "SignWith: ${SIGNER}" >> ${CONFFILE}
28
29# create the repository
30echo Building the repository...
31find ../.. -name i2p_*.deb -maxdepth 1 -exec reprepro --ask-passphrase --outdir ${DIR} includedeb all {} \;
32find ../.. -name i2p_*.changes -maxdepth 1 -exec reprepro --ask-passphrase --outdir ${DIR} include all {} \;
33
34# export the public key
35gpg --armor --export ${SIGNER} > ${DIR}/0x${KEYID}.asc
36
37# remove the config file created above
38echo Cleaning up...
39rm -f ${CONFFILE}
40rmdir ${CONFDIR}
41
42echo Debian repository created in `pwd`/${DIR}.
Note: See TracBrowser for help on using the repository browser.