File: build-orig.sh

package info (click to toggle)
ldb 2:1.1.27-1+deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,128 kB
  • sloc: ansic: 59,816; python: 23,333; xml: 2,062; sh: 839; makefile: 205
file content (24 lines) | stat: -rwxr-xr-x 577 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash -e

version=$( dpkg-parsechangelog -l`dirname $0`/changelog | sed -n 's/^Version: \(.*:\|\)//p' | sed 's/-[0-9.]\+$//' )
if echo $version | grep -v git >/dev/null; then
	# Not a snapshot, use watch
	exit 1
fi

if [ -z "$SAMBA_GIT_URL" ]; then
	SAMBA_GIT_URL=git://git.samba.org/samba.git
fi

LDBTMP=`mktemp -d`
if [ -d $SAMBA_GIT_URL/.bzr ]; then
	bzr co --lightweight $SAMBA_GIT_URL $LDBTMP
else
	git clone --depth 1 $SAMBA_GIT_URL $LDBTMP
fi
pushd $LDBTMP/lib/ldb
./configure
make dist
popd
mv $LDBTMP/lib/ldb/ldb-*.tar.gz ldb_$version.orig.tar.gz
rm -rf $LDBTMP