build.sh 1.31 KB
Newer Older
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
1 2
#!/bin/sh
# set -x
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
3
set -e
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
4 5 6

package="radsecproxy"
version="1.6.8"
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
7 8 9
revision="uninett-2"

export TZ="Europe/Oslo"
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
now=$(date +"%a, %d %b %Y %T %z")

here=$(pwd)

export DEBIAN_FRONTEND=noninteractive

cat >> /etc/apt/sources.list << EOF
deb-src http://httpredir.debian.org/debian jessie main
deb-src http://httpredir.debian.org/debian jessie-updates main
deb-src http://security.debian.org jessie/updates main
EOF

apt-get update
apt-get -y upgrade
apt-get -y install curl debhelper dh-autoreconf dh-systemd autotools-dev libssl-dev nettle-dev docbook2x

curl -o "${package}"_"${version}".orig.tar.gz "https://software.nordu.net/${package}/${package}-${version}.tar.gz"
tar xzf "${package}"_"${version}".orig.tar.gz

apt-get source ${package}
tar xf "${package}"_*.debian.tar.xz -C "${package}"-"${version}/"

32
cp patches/* "${package}"-"${version}"/debian/patches/
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
33 34 35 36 37
for patch in patches/* ; do
  echo ${patch##*/}
done >> "${package}"-"${version}"/debian/patches/series

cat > changelog << EOF
38
radsecproxy (${version}~${revision}) unstable; urgency=medium
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
39 40 41 42 43 44 45 46 47 48 49 50

  * New upstream release, with uninett-specific patches

 -- Kolbjørn Barmen <debian@kolla.no>  ${now}

EOF
cat "${package}-${version}/debian/changelog" >> changelog
cat changelog > "${package}-${version}/debian/changelog"

cd "${package}-${version}/"
dpkg-buildpackage
cd "${here}"