From 8759fa511c0464efaea926dcb1271c0ca95e4eb6 Mon Sep 17 00:00:00 2001 From: Linux User Date: Thu, 1 Oct 2009 20:26:05 +0200 Subject: abstract package backend, add perl --- scripts/tarpkg | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 scripts/tarpkg (limited to 'scripts/tarpkg') diff --git a/scripts/tarpkg b/scripts/tarpkg new file mode 100755 index 000000000..c126af594 --- /dev/null +++ b/scripts/tarpkg @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# create/install compressed tar balls + +if [ "$1" = "build" ];then + if [ ! -d $2 ];then + echo "not a directory" + exit 1 + fi + pkgname=$(grep "^Package:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//") + version=$(grep "^Version:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//") + arch=$(grep "^Architecture:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//") + cd $2 + rm -rf CONTROL + tar -czf $3/${pkgname}_${version}_${arch}.tar.gz . + cd - + exit 0 +elif [ "$1" = "install" ];then + tar -xzpf $2 -C ${INSTROOT} + exit 0 +else + echo "unknown command" + exit 1 +fi +exit 0 -- cgit v1.2.3 From 6d26b19269a28ff576e872473cb3b4610a61fceb Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 11 Oct 2009 19:36:32 +0200 Subject: make more apps statically linkable - update libusb to latest upstream - update bluez to latest upstream - add a new PKG_OPTS option: libonly, useful for library only packages, which are not created, when static linking is choosen --- scripts/tarpkg | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'scripts/tarpkg') diff --git a/scripts/tarpkg b/scripts/tarpkg index c126af594..818f99ea7 100755 --- a/scripts/tarpkg +++ b/scripts/tarpkg @@ -9,16 +9,11 @@ if [ "$1" = "build" ];then pkgname=$(grep "^Package:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//") version=$(grep "^Version:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//") arch=$(grep "^Architecture:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//") - cd $2 - rm -rf CONTROL - tar -czf $3/${pkgname}_${version}_${arch}.tar.gz . - cd - - exit 0 + rm -rf $2/CONTROL + (cd $2 && tar -czf $3/${pkgname}_${version}_${arch}.tar.gz .) elif [ "$1" = "install" ];then tar -xzpf $2 -C ${INSTROOT} - exit 0 else echo "unknown command" exit 1 fi -exit 0 -- cgit v1.2.3 From 91dd4bc6d8f52d62171e721839505f1a80c5a83a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 28 Dec 2009 15:01:16 +0100 Subject: use tar archive as default package backend it saves more than 200 kb on minimal setup for AG241 target. Normally reflashing or complete updates are recommended. Partial updates via ipkg are not supported right now. (we have a read-only root filesystem without any writable partition for any data outside /etc) If someone likes ipkg, it still can be selected and used. --- scripts/tarpkg | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'scripts/tarpkg') diff --git a/scripts/tarpkg b/scripts/tarpkg index 818f99ea7..f2e5def9e 100755 --- a/scripts/tarpkg +++ b/scripts/tarpkg @@ -1,5 +1,6 @@ #!/usr/bin/env bash # create/install compressed tar balls +#set -x if [ "$1" = "build" ];then if [ ! -d $2 ];then @@ -9,10 +10,25 @@ if [ "$1" = "build" ];then pkgname=$(grep "^Package:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//") version=$(grep "^Version:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//") arch=$(grep "^Architecture:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//") + mkdir -p ${2}/usr/lib/pkg + for file in preinst postinst prerm postrm; do + [ ! -f $2/CONTROL/$file ] || ( cp $2/CONTROL/$file \ + ${2}/usr/lib/pkg/${pkgname}.$file && \ + chmod +x ${2}/usr/lib/pkg/${pkgname}.$file ) + done rm -rf $2/CONTROL (cd $2 && tar -czf $3/${pkgname}_${version}_${arch}.tar.gz .) elif [ "$1" = "install" ];then - tar -xzpf $2 -C ${INSTROOT} + pkg=$(echo $(basename $2)|sed -e "s#_.*##") + if [ -x ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.preinst ]; then + IPKG_INSTROOT="$PKG_INSTROOT" ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.preinst + rm ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.preinst + fi + tar -xzpf $2 -C ${PKG_INSTROOT} + if [ -x ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.postinst ]; then + IPKG_INSTROOT="$PKG_INSTROOT" ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.postinst + rm ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.postinst + fi else echo "unknown command" exit 1 -- cgit v1.2.3 From 9e96117b552c19b78cc4f15922a124d1f3edc0c3 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 30 Jan 2010 11:20:55 +0100 Subject: remove unneeded directory after executing postinst scripts --- scripts/tarpkg | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/tarpkg') diff --git a/scripts/tarpkg b/scripts/tarpkg index f2e5def9e..bbb242a5e 100755 --- a/scripts/tarpkg +++ b/scripts/tarpkg @@ -29,6 +29,7 @@ elif [ "$1" = "install" ];then IPKG_INSTROOT="$PKG_INSTROOT" ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.postinst rm ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.postinst fi + rm -rf ${PKG_INSTROOT}/usr/lib/pkg else echo "unknown command" exit 1 -- cgit v1.2.3 From 6daa792eab1488d013fefc5eb7e4d01f40f38687 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 7 Feb 2010 20:03:20 +0100 Subject: change defaults for CONFIG/BUILD/INSTALL styles All packages need an update, so here is a very huge commit. Most of the 460 source packages use automatic style for configuration, building and installing. Make these styles default to "auto". If you have a package, which does not conform to this, just use manual style and add a do-$task make target. I added a new style named AUTOTOOL style, which is needed for some broken packages, which needs to be updated via autoconf or automake. I renamed CONFIGURE_STYLE to CONFIG_STYLE. Updates for some packages, which have newer upstream versions. Renaming of all package/*/extra directories. Use the directory src/ to provide overwrites of source files or to add the code, when no upstream package is available or used. src directory will be automatically used. --- scripts/tarpkg | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts/tarpkg') diff --git a/scripts/tarpkg b/scripts/tarpkg index bbb242a5e..37c0b2079 100755 --- a/scripts/tarpkg +++ b/scripts/tarpkg @@ -10,10 +10,9 @@ if [ "$1" = "build" ];then pkgname=$(grep "^Package:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//") version=$(grep "^Version:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//") arch=$(grep "^Architecture:" $2/CONTROL/control | sed -e "s/^[^:]*:[[:space:]]*//") - mkdir -p ${2}/usr/lib/pkg for file in preinst postinst prerm postrm; do - [ ! -f $2/CONTROL/$file ] || ( cp $2/CONTROL/$file \ - ${2}/usr/lib/pkg/${pkgname}.$file && \ + [ ! -f $2/CONTROL/$file ] || ( mkdir -p ${2}/usr/lib/pkg && \ + cp $2/CONTROL/$file ${2}/usr/lib/pkg/${pkgname}.$file && \ chmod +x ${2}/usr/lib/pkg/${pkgname}.$file ) done rm -rf $2/CONTROL -- cgit v1.2.3 From 7fab693c5c07f094a50f3686ad1fae6353f1161b Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 10 Feb 2010 19:08:45 +0100 Subject: disable debug --- scripts/tarpkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/tarpkg') diff --git a/scripts/tarpkg b/scripts/tarpkg index 6eca63a6f..37c0b2079 100755 --- a/scripts/tarpkg +++ b/scripts/tarpkg @@ -1,6 +1,6 @@ #!/usr/bin/env bash # create/install compressed tar balls -set -x +#set -x if [ "$1" = "build" ];then if [ ! -d $2 ];then -- cgit v1.2.3