Update debian package to libnfs 1.9.6.
[deb_libnfs.git] / debian / libnfs-get-orig-source
CommitLineData
03746e44
AM
1#!/bin/sh
2
3# Script used to generate the orig source tarball for libnfs.
4
5LIBNFS_GIT_URL="git://github.com/sahlberg/libnfs.git"
e78e413d
JB
6LIBNFS_GIT_TAG="libnfs-1.9.6"
7LIBNFS_VERSION="1.9.6"
03746e44 8
375eb097 9rm -rf "libnfs-${LIBNFS_VERSION}"
03746e44 10git clone "$LIBNFS_GIT_URL" "libnfs-${LIBNFS_VERSION}"
03746e44 11cd "libnfs-${LIBNFS_VERSION}"
375eb097 12git checkout "$LIBNFS_GIT_TAG"
03746e44
AM
13./bootstrap
14cd ..
15
16# Remove temp files and other cruft from source tarball
17# The find command snippet here was taken from debhelper's dh_clean command
18# with some modification to delete more unneeded files.
19echo "Removing temp files and other cruft from source tarball"
20find libnfs-${LIBNFS_VERSION} \( \( -type f -a \
21 \( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
22 -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
23 -o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
24 -o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
25 -o -name config.status -o -name config.cache -o -name config.log \
26 \) -exec rm -f "{}" \; \) -o \
27 \( -type d -a -name autom4te.cache -prune -exec rm -rf "{}" \; \) \)
28rm -rf libnfs-${LIBNFS_VERSION}/.git
29rm -f libnfs-${LIBNFS_VERSION}/.gitignore
30
31# Remove empty directories
32echo "Removing empty directories"
33find libnfs-${LIBNFS_VERSION} -type d -empty -delete
34
35tar --exclude-vcs -czf "libnfs_${LIBNFS_VERSION}.orig.tar.gz" \
36 "libnfs-${LIBNFS_VERSION}/"