File: crystalhd-get-orig-source

package info (click to toggle)
crystalhd 1%3A0.0~git20110715.fdd2f19-12
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,420 kB
  • sloc: ansic: 66,858; sh: 11,306; cpp: 9,812; makefile: 136
file content (40 lines) | stat: -rwxr-xr-x 1,582 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
40
#!/bin/sh

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

CRYSTALHD_GIT_URL="git://linuxtv.org/jarod/crystalhd.git"
CRYSTALHD_GIT_COMMIT="fdd2f19ac739a3db1fd7469ea19ceaefe0822e5a"
DATE_RETRIEVED="20110715"
COMMIT_SHORT_FORM="$(echo $CRYSTALHD_GIT_COMMIT | \
                     sed -e 's/^\([[:xdigit:]]\{,7\}\).*/\1/')"
CRYSTALHD_VERSION="0.0~git${DATE_RETRIEVED}.${COMMIT_SHORT_FORM}"

git clone "$CRYSTALHD_GIT_URL" "crystalhd-${CRYSTALHD_VERSION}"
cd "crystalhd-${CRYSTALHD_VERSION}"
git checkout "$CRYSTALHD_GIT_COMMIT"
rm -rf .git firmware
find . -name .gitignore -delete

# Setup build systems
autoreconf -vif driver/linux
cd filters/gst/gst-plugin
./autogen.sh
make clean distclean
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 crystalhd-${CRYSTALHD_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 "{}" \; \) \)

# Generate tarball
tar --exclude-vcs -czf "crystalhd_${CRYSTALHD_VERSION}.orig.tar.gz" \
  "crystalhd-${CRYSTALHD_VERSION}/"