build.sh 1.54 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

package="radsecproxy"
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
6 7
version="1.7.2"
revision="1~uninett"
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
8 9

export TZ="Europe/Oslo"
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
10 11 12 13 14 15 16
now=$(date +"%a, %d %b %Y %T %z")

here=$(pwd)

export DEBIAN_FRONTEND=noninteractive

cat >> /etc/apt/sources.list << EOF
17 18 19
deb-src http://cdn-fastly.deb.debian.org/debian stretch main
deb-src http://cdn-fastly.deb.debian.org/debian stretch-updates main
deb-src http://security.debian.org stretch/updates main
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
20 21 22 23
EOF

apt-get update

Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
24 25 26
RADSECPROXY_URL="https://github.com/${package}/${package}"
RADSECPROXY_SRCURL="${RADSECPROXY_URL}/releases/download/${version}/${package}-${version}.tar.gz"
curl --silent -o "${package}"_"${version}".orig.tar.gz -L "${RADSECPROXY_SRCURL}"
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
27
tar xzf "${package}"_"${version}".orig.tar.gz
28 29 30
#git clone https://git.nordu.net/radsecproxy.git "${package}"-"${version}"
#tar czf "${package}"_"${version}".orig.tar.gz "${package}"-"${version}"
#( cd "${package}"-"${version}" ; aclocal ; automake --add-missing )
Kolbjørn Barmen's avatar
Kolbjørn Barmen committed
31 32 33 34

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

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

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

  * 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}"