| 1 | #!/bin/sh |
| 2 | |
| 3 | # Script used to generate the orig source tarball for libcec. |
| 4 | |
| 5 | LIBCEC_GIT_URL="git://github.com/Pulse-Eight/libcec.git" |
| 6 | LIBCEC_GIT_BRANCH="release" |
| 7 | LIBCEC_VERSION="1.6.1" |
| 8 | |
| 9 | rm -rf "libcec-${LIBCEC_VERSION}" |
| 10 | git clone "$LIBCEC_GIT_URL" "libcec-${LIBCEC_VERSION}" |
| 11 | cd "libcec-${LIBCEC_VERSION}" |
| 12 | git checkout -b "$LIBCEC_GIT_BRANCH" origin/"$LIBCEC_GIT_BRANCH" |
| 13 | autoreconf -vif |
| 14 | cd .. |
| 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. |
| 19 | echo "Removing temp files and other cruft from source tarball" |
| 20 | find 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 "{}" \; \) \) |
| 28 | rm -rf libcec-${LIBCEC_VERSION}/.git |
| 29 | rm -f libcec-${LIBCEC_VERSION}/.gitignore |
| 30 | rm -rf libcec-${LIBCEC_VERSION}/debian |
| 31 | |
| 32 | # Remove empty directories |
| 33 | echo "Removing empty directories" |
| 34 | find libcec-${LIBCEC_VERSION} -type d -empty -delete |
| 35 | |
| 36 | tar --exclude-vcs -czf "libcec_${LIBCEC_VERSION}.orig.tar.gz" \ |
| 37 | "libcec-${LIBCEC_VERSION}/" |