summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xmkipks29
1 files changed, 3 insertions, 26 deletions
diff --git a/mkipks b/mkipks
index 982a007..63d1e22 100755
--- a/mkipks
+++ b/mkipks
@@ -46,52 +46,46 @@ do
case "$1" in
-v)
VERB=1
echo >&2 "Packaging for version $VERSION_MAJ.$VERSION_MIN.$VERSION_PAT$VERSION_CVS"
;; -l)
LIST=1
;; -i)
shift
IMAGEDIR=$1
DATADIR=$IMAGEDIR
mkdir -p $IMAGEDIR
;; -classic)
- CLASSIC=1
+ classicopts=-c
;; -rpm)
if [ "$OPIEDIR" != "/opt/Qtopia" ]
then
echo >&2 '$OPIEDIR is not the standard /usr/Qtopia directory.'
sleep 1
#exit 1
fi
RPM=1
;; -arch)
shift
ARCH=$1
STRIP=
STRIP_FILES=
;; /*)
FILES="$FILES $1"
;; *)
FILES="$FILES $PWD/$1"
esac
shift
done
-if [ -n "$CLASSIC" ]
-then
- DATADIR=$TDIR/data
- CTRLDIR=$TDIR/control
-fi
-
if [ -z "$FILES" ]
then
FILES=`find $OPIEDIR -name "*.control" -print`
fi
RDIR=$PWD
ORIGDIR=`pwd`
cd $OPIEDIR
for i in $FILES
do
rm -rf $TDIR
@@ -209,52 +203,35 @@ do
then
echo "Warning, no mkfs.jffs2 found, unable to set Installed-Size."
SIZEWARNED=1
fi
fi
echo "Architecture: $ARCH" >>$CTRLDIR/control
echo "Filename: ./$package.ipk" >>$CTRLDIR/control
echo "Version: $version" >>$CTRLDIR/control
[ ! -z "$depends" ] && echo "Depends: $depends" >>$CTRLDIR/control
[ ! -z "$provides" ] && echo "Provides: $provides" >>$CTRLDIR/control
[ ! -z "$conflicts" ] && echo "Conflicts: $conflicts" >>$CTRLDIR/control
egrep -v "^(Files|Version|Depends|Provides|Conflicts|Architecture):" >>$CTRLDIR/control $i
- [ -n "$CLASSIC" ] && echo "$DEB_VERSION" >$TDIR/debian-binary
+ [ -n "$classicopts" ] && echo "$DEB_VERSION" >$TDIR/debian-binary
base=${i%.control}
scripts="preinst postinst prerm postrm"
for pf in $scripts
do
if [ -x ${base}.$pf ]
then
cp ${base}.$pf $CTRLDIR/$pf
fi
done
- if [ -z "$CLASSIC" ]
- then
- cd $ORIGDIR; $OPIEDIR/scripts/ipkg-build -o root -g root $TDIR; cd $OPIEDIR;
- else
- if [ "`id -u`" != "0" ]
- then
- if [ -z "$ROOTWARNED" ]
- then
- echo Warning. You are not root. Please become root or use fakeroot.
- ROOTWARNED=1
- fi
- else
- chown -R root.root $TDIR/*
- fi
- ( cd $DATADIR && tar -czf $TDIR/data.tar.gz * )
- ( cd $CTRLDIR && tar -czf $TDIR/control.tar.gz * )
- ( cd $TDIR && tar -czf $OPIEDIR/$package.ipk ./control.tar.gz ./data.tar.gz ./debian-binary )
- fi
+ cd $ORIGDIR; $OPIEDIR/scripts/ipkg-build $classicopts -o root -g root $TDIR; cd $OPIEDIR;
RESULT=$package.ipk
if [ -n "$VERB" ]
then
echo >&2 "Built $RESULT ($size)"
fi
if [ -n "$LIST" ]
then
echo $RESULT
fi
fi
else
echo >&2 "Not building $package package"