File: rules

package info (click to toggle)
sqlite3-pcre 0~git20070120091816%2B4229ecc-1
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 76 kB
  • ctags: 12
  • sloc: ansic: 99; makefile: 28
file content (18 lines) | stat: -rwxr-xr-x 655 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/make -f

%:
	dh $@

get-orig-source::
	version=$$(dpkg-parsechangelog -c1 | grep ^Version: | sed -e 's/Version: //'); \
	shorthash=$$(echo $${version} | sed -e 's/0~git[0-9]\{14\}+\([0-9a-f]\{7\}\).*/\1/'); \
	tmpdir=$$(mktemp -d); \
	cd $${tmpdir}; \
	git clone git://git.altlinux.org/people/at/packages/sqlite3-pcre.git; \
	cd sqlite3-pcre; \
	git checkout $${shorthash} 2> /dev/null; \
	stamp=$$(date --date="$$(git log -n1 --date=rfc | grep Date | sed -e 's/Date: *//')" +%Y%m%d%H%M%S); \
	cd ..; \
	tar --exclude=.git -czf ${CURDIR}/sqlite3-pcre_0~git$${stamp}+$${shorthash}.orig.tar.gz sqlite3-pcre; \
	cd ${CURDIR}; \
	rm -rf $${tmpdir}