diff options
author | Enno Boland <g@s01.de> | 2014-09-28 23:23:54 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2014-10-10 16:44:40 +0200 |
commit | e56fde89d78cc20bb1693f47e29f30f9a6912cfc (patch) | |
tree | f010a207fdf31ad6bdfd97942a3040552b934931 /xnew | |
parent | a00c54873041e18cc0f9833b6894a09e2e196c87 (diff) | |
download | xtools-e56fde89d78cc20bb1693f47e29f30f9a6912cfc.tar.gz xtools-e56fde89d78cc20bb1693f47e29f30f9a6912cfc.tar.xz xtools-e56fde89d78cc20bb1693f47e29f30f9a6912cfc.zip |
xnew: add support for sub package.
Diffstat (limited to 'xnew')
-rwxr-xr-x | xnew | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/xnew b/xnew index 3b02781..236b796 100755 --- a/xnew +++ b/xnew @@ -3,6 +3,7 @@ PKG=${1?no package name given} srcdir=$(xdistdir)/srcpkgs +shift mkdir $srcdir/$PKG @@ -31,4 +32,32 @@ distfiles="" checksum=badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb EOF +for subpkg; do + ln -sr -- "$srcdir/$PKG" "$srcdir/$subpkg" + cat >>$srcdir/$PKG/template <<EOF + +${subpkg}_package() { +EOF + case $subpkg in + *-devel) cat >>$srcdir/$PKG/template <<EOF + depends="$PKG>=\${version}_\${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +EOF + ;; + *) cat >>$srcdir/$PKG/template <<EOF + pkg_install() { + #vmove path + } +EOF + ;; + esac + echo "}" >>$srcdir/$PKG/template +done + exec ${EDITOR:-vim} +3 $srcdir/$PKG/template |