summaryrefslogtreecommitdiff
path: root/mkipks
authorkergoth <kergoth>2002-10-13 22:36:31 (UTC)
committer kergoth <kergoth>2002-10-13 22:36:31 (UTC)
commit30faba6b2e07457fcda55e6e968f1230a2e5edda (patch) (unidiff)
treeb7edba6aa28c24265f6ce88c0e0e77162cb802ec /mkipks
parentc94a9c3a93907d8a0c034e5b4c6d0a768d9fea7c (diff)
downloadopie-30faba6b2e07457fcda55e6e968f1230a2e5edda.zip
opie-30faba6b2e07457fcda55e6e968f1230a2e5edda.tar.gz
opie-30faba6b2e07457fcda55e6e968f1230a2e5edda.tar.bz2
minor tweak to allow passing VERSION_CVS via the environment
Diffstat (limited to 'mkipks') (more/less context) (ignore whitespace changes)
-rwxr-xr-xmkipks2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkipks b/mkipks
index 63d1e22..ca934d8 100755
--- a/mkipks
+++ b/mkipks
@@ -1,151 +1,151 @@
1#!/bin/sh 1#!/bin/sh
2 2
3QTE_VERSION=2.3.4 3QTE_VERSION=2.3.4
4DEB_VERSION=2.0 4DEB_VERSION=2.0
5 5
6# Have to do this here, since CVS can't store symlinks 6# Have to do this here, since CVS can't store symlinks
7mkdir -p $OPIEDIR/etc/rc2.d 7mkdir -p $OPIEDIR/etc/rc2.d
8ln -sf ../init.d/opie $OPIEDIR/etc/rc2.d/S98opie 8ln -sf ../init.d/opie $OPIEDIR/etc/rc2.d/S98opie
9 9
10mkdir -p $OPIEDIR/etc/rcS.d 10mkdir -p $OPIEDIR/etc/rcS.d
11ln -sf ../init.d/bootsplash $OPIEDIR/etc/rcS.d/S01bootsplash 11ln -sf ../init.d/bootsplash $OPIEDIR/etc/rcS.d/S01bootsplash
12 12
13ln -sf ../init.d/opieatd $OPIEDIR/ipaq/etc/rc2.d/S96opieatd 13ln -sf ../init.d/opieatd $OPIEDIR/ipaq/etc/rc2.d/S96opieatd
14 14
15 15
16 16
17VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h) 17VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h)
18VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h) 18VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h)
19VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$OPIEDIR/include/qpe/version.h) 19VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$OPIEDIR/include/qpe/version.h)
20SUB_VERSION=$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$OPIEDIR/include/qpe/version.h) 20SUB_VERSION=$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$OPIEDIR/include/qpe/version.h)
21if grep -q 'QPE_VERSION .*snapshot' $OPIEDIR/include/qpe/version.h 21if grep -q 'QPE_VERSION .*snapshot' $OPIEDIR/include/qpe/version.h
22then 22then
23 VERSION_CVS="$(date +%Y%m%d)" 23 [ -z "$VERSION_CVS" ] && VERSION_CVS="$(date +%Y%m%d)"
24 SUB_VERSION=$VERSION_CVS 24 SUB_VERSION=$VERSION_CVS
25else 25else
26 VERSION_CVS="" 26 VERSION_CVS=""
27fi 27fi
28 28
29QPE_VERSION=$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT 29QPE_VERSION=$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT
30 30
31ARCH=arm 31ARCH=arm
32STRIP=arm-linux-strip 32STRIP=arm-linux-strip
33STRIP_FILES="*ARM*not stripped" 33STRIP_FILES="*ARM*not stripped"
34 34
35TDIR=/tmp/ipk$$ 35TDIR=/tmp/ipk$$
36DATADIR=$TDIR 36DATADIR=$TDIR
37CTRLDIR=$TDIR/CONTROL 37CTRLDIR=$TDIR/CONTROL
38 38
39IMAGEDIR= 39IMAGEDIR=
40VERB= 40VERB=
41LIST= 41LIST=
42RPM= 42RPM=
43 43
44while [ $# -ne 0 ] 44while [ $# -ne 0 ]
45do 45do
46 case "$1" in 46 case "$1" in
47 -v) 47 -v)
48 VERB=1 48 VERB=1
49 echo >&2 "Packaging for version $VERSION_MAJ.$VERSION_MIN.$VERSION_PAT$VERSION_CVS" 49 echo >&2 "Packaging for version $VERSION_MAJ.$VERSION_MIN.$VERSION_PAT$VERSION_CVS"
50 ;; -l) 50 ;; -l)
51 LIST=1 51 LIST=1
52 ;; -i) 52 ;; -i)
53 shift 53 shift
54 IMAGEDIR=$1 54 IMAGEDIR=$1
55 DATADIR=$IMAGEDIR 55 DATADIR=$IMAGEDIR
56 mkdir -p $IMAGEDIR 56 mkdir -p $IMAGEDIR
57 ;; -classic) 57 ;; -classic)
58 classicopts=-c 58 classicopts=-c
59 ;; -rpm) 59 ;; -rpm)
60 if [ "$OPIEDIR" != "/opt/Qtopia" ] 60 if [ "$OPIEDIR" != "/opt/Qtopia" ]
61 then 61 then
62 echo >&2 '$OPIEDIR is not the standard /usr/Qtopia directory.' 62 echo >&2 '$OPIEDIR is not the standard /usr/Qtopia directory.'
63 sleep 1 63 sleep 1
64 #exit 1 64 #exit 1
65 fi 65 fi
66 RPM=1 66 RPM=1
67 ;; -arch) 67 ;; -arch)
68 shift 68 shift
69 ARCH=$1 69 ARCH=$1
70 STRIP= 70 STRIP=
71 STRIP_FILES= 71 STRIP_FILES=
72 ;; /*) 72 ;; /*)
73 FILES="$FILES $1" 73 FILES="$FILES $1"
74 ;; *) 74 ;; *)
75 FILES="$FILES $PWD/$1" 75 FILES="$FILES $PWD/$1"
76 esac 76 esac
77 shift 77 shift
78done 78done
79 79
80if [ -z "$FILES" ] 80if [ -z "$FILES" ]
81then 81then
82 FILES=`find $OPIEDIR -name "*.control" -print` 82 FILES=`find $OPIEDIR -name "*.control" -print`
83fi 83fi
84 84
85RDIR=$PWD 85RDIR=$PWD
86ORIGDIR=`pwd` 86ORIGDIR=`pwd`
87cd $OPIEDIR 87cd $OPIEDIR
88 88
89for i in $FILES 89for i in $FILES
90do 90do
91 rm -rf $TDIR 91 rm -rf $TDIR
92 92
93 mkdir -p $DATADIR 93 mkdir -p $DATADIR
94 mkdir -p $CTRLDIR 94 mkdir -p $CTRLDIR
95 95
96 packagename=${i##*/}; packagename=${packagename%.control} 96 packagename=${i##*/}; packagename=${packagename%.control}
97 version=$(eval echo '"'$(sed -n -e "s/^Version: *//p" $i)'"') 97 version=$(eval echo '"'$(sed -n -e "s/^Version: *//p" $i)'"')
98 depends=$(eval echo '"'$(sed -n -e "s/^Depends: *//p" $i)'"') 98 depends=$(eval echo '"'$(sed -n -e "s/^Depends: *//p" $i)'"')
99 files=$(eval echo $(sed -n -e "s/^Files://p" $i)) 99 files=$(eval echo $(sed -n -e "s/^Files://p" $i))
100 arch=$(eval echo $(sed -n -e "s/^Arch://p" $i)) 100 arch=$(eval echo $(sed -n -e "s/^Arch://p" $i))
101 section=$(sed -n -e "s/^Section: *//p" $i) 101 section=$(sed -n -e "s/^Section: *//p" $i)
102 provides=$(sed -n -e "s/^Provides: *//p" $i) 102 provides=$(sed -n -e "s/^Provides: *//p" $i)
103 conflicts=$(sed -n -e "s/^Conflicts: *//p" $i) 103 conflicts=$(sed -n -e "s/^Conflicts: *//p" $i)
104 license=$(sed -n -e "s/^License: *//p" $i) 104 license=$(sed -n -e "s/^License: *//p" $i)
105 summary=$(sed -n -e "s/^Description: *//p" $i) 105 summary=$(sed -n -e "s/^Description: *//p" $i)
106 package=${packagename}_${version}_$ARCH 106 package=${packagename}_${version}_$ARCH
107 ERROR= 107 ERROR=
108 if [ -z "$files" ] 108 if [ -z "$files" ]
109 then 109 then
110 mkdir -p $DATADIR/usr/share/doc/$packagename 110 mkdir -p $DATADIR/usr/share/doc/$packagename
111 else 111 else
112 for f in $files 112 for f in $files
113 do 113 do
114 if [ -d $f ] 114 if [ -d $f ]
115 then 115 then
116 ffiles=$(find $f -type f -o -type b -o -type c -o -type l) 116 ffiles=$(find $f -type f -o -type b -o -type c -o -type l)
117 else 117 else
118 ffiles=$f 118 ffiles=$f
119 fi 119 fi
120 for ff in $ffiles 120 for ff in $ffiles
121 do 121 do
122 case $ff in 122 case $ff in
123 */CVS/*) 123 */CVS/*)
124 continue 124 continue
125 ;;*~) 125 ;;*~)
126 continue 126 continue
127 ;;*.control) 127 ;;*.control)
128 continue 128 continue
129 ;; $QTDIR/*) 129 ;; $QTDIR/*)
130 BASE=$(dirname /opt/QtPalmtop/${ff#$QTDIR/}) 130 BASE=$(dirname /opt/QtPalmtop/${ff#$QTDIR/})
131 ;; etc/*.d/*) 131 ;; etc/*.d/*)
132 BASE=$(dirname /$ff) 132 BASE=$(dirname /$ff)
133 ;; ipaq/*) 133 ;; ipaq/*)
134 BASE=$(dirname ${ff#ipaq}) 134 BASE=$(dirname ${ff#ipaq})
135 ;; *) 135 ;; *)
136 # For SHARP ROM compatibility. Should change to Qtopia. 136 # For SHARP ROM compatibility. Should change to Qtopia.
137 BASE=/opt/QtPalmtop/$(dirname $ff) 137 BASE=/opt/QtPalmtop/$(dirname $ff)
138 esac 138 esac
139 139
140 if [ -f $ff -o -b $ff -o -c $ff ] 140 if [ -f $ff -o -b $ff -o -c $ff ]
141 then 141 then
142 D=$DATADIR$BASE 142 D=$DATADIR$BASE
143 if [ -x $ff -a -n "$STRIP" ] 143 if [ -x $ff -a -n "$STRIP" ]
144 then 144 then
145 case $(file $ff) in 145 case $(file $ff) in
146 $STRIP_FILES) 146 $STRIP_FILES)
147 $STRIP $ff 147 $STRIP $ff
148 ;; *) 148 ;; *)
149 esac 149 esac
150 fi 150 fi
151 if [ -n "$RPM" ] 151 if [ -n "$RPM" ]