Cygport per-package PKG_EXCLUDE?
Corinna Vinschen
corinna-cygwin@cygwin.com
Sat Aug 3 21:02:00 GMT 2013
On Aug 3 21:36, Achim Gratz wrote:
> David Stacey writes:
> > cygport already has the --exclude option that you can use when
> > specifying package contents.
>
> Not really a cygport option, but a side-effect of $pkg_contents getting
> expanded into the command line of (GNU) tar which then interprets the
> --exclude directive.
>
> > For example, in poco.cygport I have this:
> >
> > poco_CONTENTS="--exclude=html usr/bin/*.exe usr/share"
> > libpoco_doc_CONTENTS="usr/share/doc/poco/html"
> >
> > This means that the 'html' directory is excluded from the 'poco'
> > package, and placed in 'libpoco-doc' instead.
> >
> > Is this what you were after, or do you need something a little cleverer?
>
> The above gets the job done, but I'm not sure that it is "officially
> sanctioned". But it shows that a pkg_EXCLUDE would be easily
> implementable. A more clever implementation might be able to exclude
> globbed files from a subpackage that have been explicitly packaged in
> another subpackage, I'm just not sure it's worth the trouble.
Assuming the --exclude is not blessed, I think it might be worth the
trouble. Consider these expressions from my non-excluding cygport file:
pl_CONTENTS="usr/bin/swipl* \
usr/lib/swipl-${VERSION}/bin/[!p]* \
usr/lib/swipl-${VERSION}/bin/p[!l]* \
usr/lib/swipl-${VERSION}/customize/edit \
usr/lib/swipl-${VERSION}/customize/dotplrc \
usr/lib/swipl-${VERSION}/customize/README \
usr/lib/swipl-${VERSION}/library/[!h]* \
usr/lib/swipl-${VERSION}/library/h[!t]* \
usr/lib/swipl-${VERSION}/library/http/[!x]* \
usr/lib/swipl-${VERSION}/boot \
usr/lib/swipl-${VERSION}/boot64.prc \
usr/lib/swipl-${VERSION}/demo \
usr/lib/swipl-${VERSION}/swipl.home \
usr/share/man/man1/swipl* \
usr/share/doc/pl/[A-Za-wyz]*"
pl_devel_CONTENTS="usr/lib/swipl-${VERSION}/include \
usr/lib/swipl-${VERSION}/lib/libswipl.dll.a \
usr/lib/pkgconfig"
pl_doc_CONTENTS="usr/lib/swipl-${VERSION}/doc"
pl_static_CONTENTS="usr/lib/swipl-${VERSION}/lib/libswipl.a"
pl_xpce_CONTENTS="usr/bin/xpce* \
usr/lib/swipl-${VERSION}/Makefile \
usr/lib/swipl-${VERSION}/bin/pl2xpce.dll \
usr/lib/swipl-${VERSION}/customize/dotxpcerc \
usr/lib/swipl-${VERSION}/library/http/xpce_httpd.pl \
usr/lib/swipl-${VERSION}/swipl.rc \
usr/lib/swipl-${VERSION}/xpce \
usr/share/man/man1/xpce-client.1* \
usr/share/doc/pl/xpce"
This works, but the glob expressions in pl_CONTENTS are convoluted at
best. A pl_EXCLUDE could make this much more readable and maintainable:
pl_CONTENTS="usr/bin \
usr/lib/swipl-${VERSION} \
usr/share"
pl_devel_CONTENTS="usr/lib/swipl-${VERSION}/include \
usr/lib/swipl-${VERSION}/lib/libswipl.dll.a \
usr/lib/pkgconfig"
pl_doc_CONTENTS="usr/lib/swipl-${VERSION}/doc"
pl_static_CONTENTS="usr/lib/swipl-${VERSION}/lib/libswipl.a"
pl_xpce_CONTENTS="usr/bin/xpce* \
usr/lib/swipl-${VERSION}/Makefile \
usr/lib/swipl-${VERSION}/bin/pl2xpce.dll \
usr/lib/swipl-${VERSION}/customize/dotxpcerc \
usr/lib/swipl-${VERSION}/library/http/xpce_httpd.pl \
usr/lib/swipl-${VERSION}/swipl.rc \
usr/lib/swipl-${VERSION}/xpce \
usr/share/man/man1/xpce-client.1* \
usr/share/doc/pl/xpce"
pl_EXCLUDE="${pl_devel_CONTENTS} \
${pl_doc_CONTENTS} \
${pl_static_CONTENTS} \
${pl_xpce_CONTENTS}"
My current version now is the below one. Looks like a good compromise
for the time being.
pl_CONTENTS="--exclude=usr/bin/xpce* \
--exclude=usr/lib/swipl-${VERSION}/Makefile \
--exclude=usr/lib/swipl-${VERSION}/bin/pl2xpce.dll \
--exclude=usr/lib/swipl-${VERSION}/customize/dotxpcerc \
--exclude=usr/lib/swipl-${VERSION}/doc \
--exclude=usr/lib/swipl-${VERSION}/include \
--exclude=usr/lib/swipl-${VERSION}/lib \
--exclude=usr/lib/swipl-${VERSION}/library/http/xpce_httpd.pl \
--exclude=usr/lib/swipl-${VERSION}/swipl.rc \
--exclude=usr/lib/swipl-${VERSION}/xpce \
--exclude=usr/share/man/man1/xpce* \
--exclude=usr/share/doc/pl/xpce \
usr/bin \
usr/lib/swipl-${VERSION} \
usr/share"
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
More information about the Cygwin-apps
mailing list