Commit debian patches that touch debian/* files.
[deb_libcec.git] / debian / libcec-get-orig-source
CommitLineData
142d1b01
LOK
1#!/bin/sh
2
3# Script used to generate the orig source tarball for libcec.
4
5LIBCEC_GIT_URL="git://github.com/Pulse-Eight/libcec.git"
6LIBCEC_GIT_BRANCH="release"
ca29eefa 7LIBCEC_VERSION="2.2.0"
142d1b01
LOK
8
9rm -rf "libcec-${LIBCEC_VERSION}"
10git clone "$LIBCEC_GIT_URL" "libcec-${LIBCEC_VERSION}"
11cd "libcec-${LIBCEC_VERSION}"
12git checkout -b "$LIBCEC_GIT_BRANCH" origin/"$LIBCEC_GIT_BRANCH"
13autoreconf -vif
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 libcec-${LIBCEC_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 libcec-${LIBCEC_VERSION}/.git
29rm -f libcec-${LIBCEC_VERSION}/.gitignore
30rm -rf libcec-${LIBCEC_VERSION}/debian
31
32# Remove empty directories
33echo "Removing empty directories"
34find libcec-${LIBCEC_VERSION} -type d -empty -delete
35
36tar --exclude-vcs -czf "libcec_${LIBCEC_VERSION}.orig.tar.gz" \
37 "libcec-${LIBCEC_VERSION}/"