generic-build-script extension to update version numbers in README

Max Bowsher maxb1@ukf.net
Sat Nov 19 18:41:00 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christian Franke wrote:
> What would you think about an autoconf-like approach generating a
> "package-VER.sh" script from some "package.sh.in" (yes, no version).
> 
> Then fixes and new features will be added to only one generation tool
> (autogbs ?-)) which can be part of a standard Cygwin package managed by
> setup.exe.
> The generator can check the actual structure of the source tree to
> create a smaller build-script.
> 
> New features can be opt'ed in by directives in the package.sh.in script
> if desired.
> Like with autoconf, it would be possibled to do special hacks by
> including shell code verbatim.

It is a good idea, but I would avoid .in naming, since I think we will
want to go beyond simple autoconf-style variable substitution.

I'm already doing programmatic editing of the g-b-s for my own packages.
Attached is 'gbsmunge.py', which reads a control file, and the
generic-build-script source, and outputs a build script munged according
to instructions in the control file.

For illustrative purposes, here is the control file for my neon package:
=======
ConfigureArg --enable-shared
ConfigureArg --disable-static
ConfigureArg --with-ssl

SubPackage libneon24-$VER-$REL.tar.bz2 usr/bin/cygneon-24.dll
=======

Max.




P.S.: The control file for the (much more complex) apache2 package:
======
ConfigureArg --enable-shared
ConfigureArg --disable-static
ConfigureArg --with-apr=/usr
ConfigureArg --with-apr-util=/usr
ConfigureArg --with-neon=/usr
ConfigureArg --with-swig=/usr/bin/swig
ConfigureArg --with-apxs=/usr/sbin/apxs2

SubPackage subversion-devel-$VER-$REL.tar.bz2 usr/include
  usr/lib/libsvn_[a-rt-z]* usr/lib/libsvn_subr*
SubPackage subversion-python-$VER-$REL.tar.bz2 usr/lib/python*
  usr/bin/cygsvn_swig_py* usr/lib/libsvn_swig_py*
SubPackage subversion-perl-$VER-$REL.tar.bz2 usr/lib/perl5
  usr/bin/cygsvn_swig_perl* usr/lib/libsvn_swig_perl*
SubPackage subversion-apache2-$VER-$REL.tar.bz2 usr/lib/apache2
SubPackage subversion-book-$VER-$REL.tar.bz2
  usr/share/doc/subversion-*/svn-book.html
  usr/share/doc/subversion-*/images

AutoreconfCmd ./autogen.sh
AutoreconfCmd find . -name "autom4te.cache" | xargs rm -rf
AutoreconfCmd sed -e 's/relink_command=\\"$relink_command\\""/"/'
  ac-helpers/ltmain.sh > gbs.$$.tmp &&
  mv gbs.$$.tmp ac-helpers/ltmain.sh

MakeTarget
MakeTarget swig-py swig_pydir=/usr/lib/python2.4/site-packages/libsvn
  swig_pydir_extra=/usr/lib/python2.4/site-packages/svn
MakeTarget swig-pl

MakeInstallTarget install
MakeInstallTarget install-swig-py
  swig_pydir=/usr/lib/python2.4/site-packages/libsvn
  swig_pydir_extra=/usr/lib/python2.4/site-packages/svn
MakeInstallTarget install-swig-pl

InstallExtraCmd mkdir -p ${instdir}/usr/share/doc/${BASEPKG}
InstallExtraCmd cp ${srcdir}/doc/book/svn-book.html
  ${instdir}/usr/share/doc/${BASEPKG}/svn-book.html
InstallExtraCmd cp -r ${srcdir}/doc/book/images
  ${instdir}/usr/share/doc/${BASEPKG}/images

# Kill perllocal.pod and containing dirs
InstallExtraCmd rm ${instdir}/usr/lib/perl5/5.8/cygwin/perllocal.pod
InstallExtraCmd rmdir ${instdir}/usr/lib/perl5/5.8/cygwin
InstallExtraCmd rmdir ${instdir}/usr/lib/perl5/5.8

UnpackExclude */apr
UnpackExclude */apr-util
UnpackExclude */neon

DiffExclude configure
DiffExclude build-outputs.mk
======
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)

iD8DBQFDf3HnfFNSmcDyxYARAkCXAKDcA+n68ib+7RoGPB5KA5PKh+z82wCbBL6Z
LcCrLFQDRtSn07pjb2GYMFE=
=Qa9j
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gbsmunge.py
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20051119/08e3d5ad/attachment.ksh>


More information about the Cygwin-apps mailing list