File: postcheckout.sh

package info (click to toggle)
gmediaserver 0.13.0-3.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,668 kB
  • ctags: 2,748
  • sloc: ansic: 19,476; sh: 4,509; xml: 513; makefile: 114; yacc: 98; perl: 18; sed: 16
file content (105 lines) | stat: -rwxr-xr-x 3,001 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#! /bin/sh
# This script is designed to be run after checkout from CVS.
# It will download a number of files into the source tree.

set -e

#dir_acarchive="/usr/share/autoconf-archive"
#url_acarchive="http://ac-archive.sourceforge.net/Miscellaneous"
#url_gnulicenses="http://gnu.org/licenses"
url_e2fsprogs="http://kent.dl.sourceforge.net/sourceforge/e2fsprogs/e2fsprogs-1.39-WIP-1231.tar.gz"
patch_e2fsprogs="uuid/e2fsprogs-1.38+1.39-WIP-2005.12.31.diff"
dir_gettext="/usr/share/gettext"

function bumpfile () {
  if [ -L "$1" -o -e "$1" ]; then
    echo "$1: file exists, renaming to $1.v0"
    rm -f "$1.v0"
    mv "$1" "$1.v0"
  fi
}

for dir in m4 doc; do
  if [ ! -d "$dir" ]; then
    echo "$dir: directory not found, aborting"
    exit 1
  fi
done

for prog in autoreconf wget patch gnulib-tool; do
  if ! type "$prog" >/dev/null 2>&1; then
    echo "$prog: missing program, aborting"
    exit 1
  fi
done

# Make empty directories
for dir in lib build-aux; do
  if [ ! -d "$dir" ]; then
    echo mkdir "$dir"
    mkdir "$dir"
  fi
done

# Make empty files
for file in ChangeLog; do
  if [ ! -f "$file" ]; then
    echo touch "$file"
    touch "$file"
  fi
done

#for m4 in ac_define_dir.m4; do
#  bumpfile "m4/$m4"
#  if [ -d "$dir_acarchive" -a -f "$dir_acarchive/$m4" ]; then
#    echo ln -s "$dir_acarchive/$m4" "m4/"
#    ln -s "$dir_acarchive/$m4" "m4/$m4"
#  else
#    wget -nv "$url_acarchive/$m4" -O "m4/$m4"
#  fi
#done

#for texi in fdl.texi gpl.texi; do
#  bumpfile "doc/$texi"
#  echo wget "$url_gnulicenses/$texi" -O "doc/$texi"
#  wget --no-verbose "$url_gnulicenses/$texi" -O "doc/$texi"
#done

bumpfile "e2fsprogs.tar.gz"
echo wget "$url_e2fsprogs" -O e2fsprogs.tar.gz
wget --no-verbose "$url_e2fsprogs" -O e2fsprogs.tar.gz
bumpfile e2fsprogs
echo mkdir e2fsprogs
mkdir e2fsprogs
echo tar xfz e2fsprogs.tar.gz -C e2fsprogs 
tar xfz e2fsprogs.tar.gz -C e2fsprogs
for file in ChangeLog COPYING clear.c compare.c copy.c gen_uuid.c isnull.c \
            pack.c parse.c unpack.c unparse.c uuid_time.c; do
  bumpfile "uuid/$file"
  echo cp e2fsprogs/\*/lib/uuid/$file uuid/
  cp e2fsprogs/*/lib/uuid/$file uuid/$file
done
rm -f e2fsprogs.tar.gz
rm -rf e2fsprogs
echo patch -d uuid -p1 \< "$patch_e2fsprogs"
patch -d uuid -p1 < "$patch_e2fsprogs"

# Install gettext files manually. This is necessary due to limitations
# (and/or bugs) in gettext's autopoint.
for file in ABOUT-NLS po/Makefile.in.in po/Rules-quot po/boldquot.sed \
            po/en@boldquot.header po/en@quot.header po/insert-header.sin \
            po/quot.sed po/remove-potcdate.sin; do
  bumpfile "$file"
  echo ln -s "$dir_gettext/$file" "$file"
  ln -s "$dir_gettext/$file" "$file"
done
bumpfile "build-aux/mkinstalldirs"
echo ln -s "$dir_gettext/mkinstalldirs" "build-aux/"
ln -s "$dir_gettext/mkinstalldirs" "build-aux/mkinstalldirs"

echo gnulib-tool --import --symlink
gnulib-tool --import --symlink
echo autoreconf --install --symlink
autoreconf --install --symlink

./configure --enable-maintainer-mode