-
Notifications
You must be signed in to change notification settings - Fork 22
/
make-debs.sh
executable file
·43 lines (35 loc) · 1.2 KB
/
make-debs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
#
# Copyright (C) 2015 Red Hat <[email protected]>
#
# Author: Loic Dachary <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library Public License for more details.
#
set -e
set -x
./install-deps.sh
git clean -dxf
base=${1:-/tmp/release}
codename=$(lsb_release -sc)
releasedir=${base}/$(lsb_release -si)/WORKDIR
rm -fr $releasedir
mkdir -p $releasedir
vers=$(git describe --match "v*" | sed s/^v//)
./make-dist.sh $vers
# rename to deb conventions
mv zlog-$vers.tar.bz2 $releasedir/zlog_$vers.orig.tar.bz2
tar -C $releasedir -jxf $releasedir/zlog_$vers.orig.tar.bz2
# this is useful when hacking on debian scripts. otherwise the build will only
# consider what is committed in git.
#cp -a debian/* $releasedir/zlog-$vers/debian/
cd ${releasedir}/zlog-${vers}
dpkg-buildpackage -j$(nproc) -uc -us