summaryrefslogtreecommitdiff
path: root/scripts
authorwimpie <wimpie>2005-01-09 03:02:21 (UTC)
committer wimpie <wimpie>2005-01-09 03:02:21 (UTC)
commit67d1d0b292553af550219d770cbd5c00987d8b8b (patch) (unidiff)
tree517759c7fbda44a40ff733e3b5d5667d90558caa /scripts
parent987bc9a2c5b39ddd4dc2a665cea65688bfd2179e (diff)
downloadopie-67d1d0b292553af550219d770cbd5c00987d8b8b.zip
opie-67d1d0b292553af550219d770cbd5c00987d8b8b.tar.gz
opie-67d1d0b292553af550219d770cbd5c00987d8b8b.tar.bz2
CONTROL files : reset version to 'standard' format
(partly rolls back my drastic all-applicatoins-same-version change) now format is x.y(.z)$EXTRAVERSION where x.y (and aptionally .z) are x : major version y : minor version z : application patch and extra version is seconds-since-epoch this value can be used to automatically upgrade versions with minor changes (without manual update of the control file)
Diffstat (limited to 'scripts') (more/less context) (ignore whitespace changes)
-rwxr-xr-xscripts/GeneratePackageMake8
-rwxr-xr-xscripts/mkipkg10
-rwxr-xr-xscripts/tothreaded4
3 files changed, 13 insertions, 9 deletions
diff --git a/scripts/GeneratePackageMake b/scripts/GeneratePackageMake
index 099d3e8..9d692a9 100755
--- a/scripts/GeneratePackageMake
+++ b/scripts/GeneratePackageMake
@@ -14,52 +14,52 @@ done > /tmp/ALL
14# makefile header 14# makefile header
15# 15#
16 16
17cat << MAKEFILEHEADER 17cat << MAKEFILEHEADER
18 18
19# 19#
20# generate -mt.control file from regular control 20# generate -mt.control file from regular control
21# arg 1 : path to control file to convert 21# arg 1 : path to control file to convert
22# 22#
23 23
24define GenerateMTControl 24define GenerateMTControl
25@echo "Generating -mt control file for \$(basename \$<)" 25@echo "Generating -mt control file for \$(basename \$<)"
26@\$(OPIEDIR)/scripts/tothreaded \$< \$(OPIEDIR)/AllThreadedPackages 26@\$(OPIEDIR)/scripts/tothreaded \$< \$(OPIEDIR)/AllThreadedPackages
27endef 27endef
28 28
29# 29#
30# package one control file 30# package one control file
31# arg 1 : directory from OPIEROOT where control file resides 31# arg 1 : directory from OPIEROOT where control file resides
32# arg 2 : control file basename without -mt (no .control) 32# arg 2 : control file basename without -mt (no .control)
33# arg 3 : control file basename with -mt if needed 33# arg 3 : control file basename with -mt if needed
34# arg 4 : package name (value specified by Package: ...) 34# arg 4 : package name (value specified by Package: ...)
35# 35#
36 36
37define DoPackage 37define DoPackage
38@echo \"Building ipk of \$(4)\" 38echo \"Building ipk of \$(4)\"
39@( \$(ForSubst) ) > \$(TOPDIR)/scripts/subst 39( \$(ForSubst) ) > \$(TOPDIR)/scripts/subst
40@( \$(ForFileSubst) ) > \$(TOPDIR)/scripts/Filesubst 40( \$(ForFileSubst) ) > \$(TOPDIR)/scripts/Filesubst
41@( cd \$(OPIEDIR); \\ 41( cd \$(OPIEDIR); \\
42 \$(OPIEDIR)/scripts/mkipkg \\ 42 \$(OPIEDIR)/scripts/mkipkg \\
43 --subst=\$(OPIEDIR)/scripts/subst \\ 43 --subst=\$(OPIEDIR)/scripts/subst \\
44 --filesubst=\$(OPIEDIR)/scripts/filesubst \\ 44 --filesubst=\$(OPIEDIR)/scripts/filesubst \\
45 --control=\$(OPIEDIR)/\$(1)/\$(3).control \\ 45 --control=\$(OPIEDIR)/\$(1)/\$(3).control \\
46 --prerm=\$(OPIEDIR)/\$(1)/\$(2).prerm \\ 46 --prerm=\$(OPIEDIR)/\$(1)/\$(2).prerm \\
47 --preinst=\$(OPIEDIR)/\$(1)/\$(2).preinst \\ 47 --preinst=\$(OPIEDIR)/\$(1)/\$(2).preinst \\
48 --postrm=\$(OPIEDIR)/\$(1)/\$(2).postrm \\ 48 --postrm=\$(OPIEDIR)/\$(1)/\$(2).postrm \\
49 --postinst=\$(OPIEDIR)/\$(1)/\$(2).postinst \\ 49 --postinst=\$(OPIEDIR)/\$(1)/\$(2).postinst \\
50 --strip=\$(STRIP) \$(OPIEDIR); \\ 50 --strip=\$(STRIP) \$(OPIEDIR); \\
51 rm -f \$(OPIEDIR)/Packages/\$(4)_*.ipk; \\ 51 rm -f \$(OPIEDIR)/Packages/\$(4)_*.ipk; \\
52 mv *.ipk \$(OPIEDIR)/Packages; \\ 52 mv *.ipk \$(OPIEDIR)/Packages; \\
53 touch \$(OPIEDIR)/Packages/\$(4) \\ 53 touch \$(OPIEDIR)/Packages/\$(4) \\
54) || true 54) || true
55endef 55endef
56 56
57# 57#
58# prepared for generating the substfile for every build 58# prepared for generating the substfile for every build
59# 59#
60 60
61define ForSubst 61define ForSubst
62echo 's,\\\$\$QPE_VERSION,\$(QPE_VERSION),g'; \\ 62echo 's,\\\$\$QPE_VERSION,\$(QPE_VERSION),g'; \\
63echo 's,\\\$\$OPIE_VERSION,\$(OPIE_VERSION),g'; \\ 63echo 's,\\\$\$OPIE_VERSION,\$(OPIE_VERSION),g'; \\
64echo 's,\\\$\$QTE_VERSION,\$(QTE_VERSION),g'; \\ 64echo 's,\\\$\$QTE_VERSION,\$(QTE_VERSION),g'; \\
65echo 's,\\\$\$QTE_REVISION,\$(QTE_REVISION),g'; \\ 65echo 's,\\\$\$QTE_REVISION,\$(QTE_REVISION),g'; \\
diff --git a/scripts/mkipkg b/scripts/mkipkg
index a336371..2f020f4 100755
--- a/scripts/mkipkg
+++ b/scripts/mkipkg
@@ -223,81 +223,85 @@ createFileList()
223 break; 223 break;
224 fi 224 fi
225 done 225 done
226 226
227 if [ $containedInList = 0 ]; then 227 if [ $containedInList = 0 ]; then
228 if ! [ -e $file -o -L $file ]; then 228 if ! [ -e $file -o -L $file ]; then
229 echo "$self: $file not found" 229 echo "$self: $file not found"
230 missing=1 230 missing=1
231 fi 231 fi
232 realFileList=$file" $realFileList" 232 realFileList=$file" $realFileList"
233 fi 233 fi
234 done 234 done
235 235
236 _popd 236 _popd
237 237
238 if [ $missing = 1 ]; then 238 if [ $missing = 1 ]; then
239 return 1 239 return 1
240 fi 240 fi
241 241
242 setVar $2 "$realFileList" 242 setVar $2 "$realFileList"
243} 243}
244 244
245stripFile() 245stripFile()
246{ 246{
247 if [ -f $1 -a -x $1 ]; then 247 if [ ! -h $1 -a -f $1 -a -x $1 ]; then
248 $strip --strip-all $1 248 $strip -p --strip-all $1
249 fi 249 fi
250} 250}
251 251
252substFile() 252substFile()
253{ 253{
254 local oldfile=$1 254 local oldfile=$1
255 255
256 if [ ! -e $2 ]; then return 1; fi 256 if [ ! -e $2 ]; then return 1; fi
257 257
258 if [ -e $oldfile -o -L $oldfile ]; then 258 if [ -e $oldfile -o -L $oldfile ]; then
259 newfile=`echo $oldfile|sed -f $2|sed -e's,^/,,g'` 259 newfile=`echo $oldfile|sed -f $2|sed -e's,^/,,g'`
260 olddir=`dirname $oldfile` 260 olddir=`dirname $oldfile`
261 base=`basename $oldfile` 261 base=`basename $oldfile`
262 newdir=`dirname $newfile` 262 newdir=`dirname $newfile`
263 263
264# echo >&2 moving $oldfile to $newfile 264# echo >&2 moving $oldfile to $newfile
265 265
266 if [ "$newdir" = "$olddir" ]; then 266 if [ "$newdir" = "$olddir" ]; then
267 return 0 267 return 0
268 fi 268 fi
269 269
270 mkdir -p $newdir 270 mkdir -p $newdir
271 mv $olddir/$base $newfile 271 mv $olddir/$base $newfile
272 rmdir -p $olddir 2>/dev/null 272 rmdir -p $olddir 2>/dev/null
273 fi 273 fi
274} 274}
275 275
276stripFiles() 276stripFiles()
277{ 277{
278 for f in $1; do 278 for f in $1; do
279 stripFile ./$f 279 # do not strip links
280 if [ ! -h ./$f ]
281 then
282 stripFile ./$f
283 fi
280 done 284 done
281} 285}
282 286
283substFiles() 287substFiles()
284{ 288{
285 for f in $1; do 289 for f in $1; do
286 substFile ./$f 290 substFile ./$f
287 done 291 done
288} 292}
289 293
290substAndStripFiles() 294substAndStripFiles()
291{ 295{
292 for f in $1; do 296 for f in $1; do
293 stripFile ./$f 297 stripFile ./$f
294 substFile ./$f $2 298 substFile ./$f $2
295 done 299 done
296} 300}
297 301
298installScript() 302installScript()
299{ 303{
300 if [ -n "$1" -a -f "$1" ]; then 304 if [ -n "$1" -a -f "$1" ]; then
301 destfile=`basename $1` 305 destfile=`basename $1`
302 filetype=`echo $destfile|cut -d. -f2` 306 filetype=`echo $destfile|cut -d. -f2`
303 if [ -n "$filetype" ]; then destfile=$filetype; fi 307 if [ -n "$filetype" ]; then destfile=$filetype; fi
diff --git a/scripts/tothreaded b/scripts/tothreaded
index 31ed31e..f916ad8 100755
--- a/scripts/tothreaded
+++ b/scripts/tothreaded
@@ -7,52 +7,52 @@
7# 7#
8# eg abc.control becoms abc-mt.control 8# eg abc.control becoms abc-mt.control
9# 9#
10 10
11# 11#
12# make sure that the depends expression has enough spaces 12# make sure that the depends expression has enough spaces
13# expression can contian : , ( ) || && 13# expression can contian : , ( ) || &&
14# 14#
15tokenize() { 15tokenize() {
16 sed "s/,/ & /g" | sed "s/)/ & /g" | sed "s/(/ & /g" | sed "s/|/ & /g" | sed "s/&/ & /g" 16 sed "s/,/ & /g" | sed "s/)/ & /g" | sed "s/(/ & /g" | sed "s/|/ & /g" | sed "s/&/ & /g"
17} 17}
18 18
19# 19#
20# function converts package name to threaded equivalend IF the 20# function converts package name to threaded equivalend IF the
21# package file HAS a threaded version 21# package file HAS a threaded version
22# 22#
23findthreadedequiv() { 23findthreadedequiv() {
24 local isin i 24 local isin i
25 for i in $* 25 for i in $*
26 do 26 do
27 isin=`grep "^$i\$" "$ALLTHREADEDPKGSFILE"` 27 isin=`grep "^$i\$" "$ALLTHREADEDPKGSFILE"`
28 if [ -z "$isin" ] 28 if [ -z "$isin" ]
29 then 29 then
30 # no threaded package 30 # no threaded package
31 echo -n "$i " 31 echo -n "$i"
32 else 32 else
33 # threaded package 33 # threaded package
34 echo -n "${isin}-mt " 34 echo -n "${isin}-mt"
35 fi 35 fi
36 done 36 done
37 echo 37 echo
38} 38}
39 39
40# 40#
41# signature of binary files 41# signature of binary files
42# currently obsolete 42# currently obsolete
43# 43#
44# ISBINARY="*ELF*LSB*" 44# ISBINARY="*ELF*LSB*"
45 45
46usage() { 46usage() {
47 echo "Usage : tothreaded <controlfile> <ALLPackages file>" 47 echo "Usage : tothreaded <controlfile> <ALLPackages file>"
48 exit 2 48 exit 2
49} 49}
50 50
51. scripts/SpecialMTFiles 51. scripts/SpecialMTFiles
52 52
53# 53#
54# get the name of the controlfile to check for threading 54# get the name of the controlfile to check for threading
55# 55#
56if [ -z "$1" ] 56if [ -z "$1" ]
57then 57then
58 usage 58 usage