File: libbluray-get-orig-source

package info (click to toggle)
libbluray 1%3A0.9.3-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,216 kB
  • ctags: 12,235
  • sloc: java: 34,821; ansic: 24,319; sh: 4,150; cpp: 1,694; makefile: 325; xml: 42
file content (39 lines) | stat: -rwxr-xr-x 1,601 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh

# Script used to generate the orig source tarball for libbluray.

LIBBLURAY_GIT_URL="git://git.videolan.org/libbluray.git"
LIBBLURAY_GIT_COMMIT="63e308d9c6ce1cd361fed713620fab16d67a84e1"
DATE_RETRIEVED="20111208"
COMMIT_SHORT_FORM="$(echo $LIBBLURAY_GIT_COMMIT | \
                     sed -e 's/^\([[:xdigit:]]\{,7\}\).*/\1/')"
LIBBLURAY_VERSION="0.2.1+git${DATE_RETRIEVED}.${COMMIT_SHORT_FORM}"

git clone "$LIBBLURAY_GIT_URL" "libbluray-${LIBBLURAY_VERSION}"

cd "libbluray-${LIBBLURAY_VERSION}"
git checkout "$LIBBLURAY_GIT_COMMIT"
./bootstrap
cd ..

# Remove temp files and other cruft from source tarball
# The find command snippet here was taken from debhelper's dh_clean command
# with some modification to delete more unneeded files.
echo "Removing temp files and other cruft from source tarball"
find libbluray-${LIBBLURAY_VERSION} \( \( -type f -a \
  \( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
  -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
  -o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
  -o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
  -o -name config.status -o -name config.cache -o -name config.log \
  \) -exec rm -f "{}" \; \) -o \
  \( -type d -a -name autom4te.cache -prune -exec rm -rf "{}" \; \) \)
rm -rf libbluray-${LIBBLURAY_VERSION}/.git
rm -f libbluray-${LIBBLURAY_VERSION}/.gitignore

# Remove empty directories
echo "Removing empty directories"
find libbluray-${LIBBLURAY_VERSION} -type d -empty -delete

tar --exclude-vcs -czf "libbluray_${LIBBLURAY_VERSION}.orig.tar.gz" \
  "libbluray-${LIBBLURAY_VERSION}/"