This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] generic-build-script


Two generic build script patches.

Number 1:
In doing the httpd->apache2 thing recently mentioned, I found that g-b-s could use some tweaks to support this better. ${BASEPKG} is currently used by the script in two different ways:
1): name-version of the base upstream package
2): name-version of the cygwin package
Of course, normally these are the same, but in my case they are not. Therefore, the following patch changes all occurrences where ${BASEPKG} is used in the second sense to ${PKG}-${VER}, so that ${BASEPKG} may be redefined in my case.


Index: generic-build-script
===================================================================
RCS file: /home/mirror/cvsmirror/cygwin-apps-cvs/packaging/templates/generic-build-script,v
retrieving revision 1.29
diff -u -p -r1.29 generic-build-script
--- generic-build-script        14 Oct 2004 22:55:26 -0000      1.29
+++ generic-build-script        21 Jun 2005 21:30:29 -0000
@@ -35,7 +35,7 @@ export PKG=`echo $tscriptname | sed -e '
export VER=`echo $tscriptname | sed -e "s/${PKG}\-//" -e 's/\-[^\-]*$//'`
export REL=`echo $tscriptname | sed -e "s/${PKG}\-${VER}\-//"`
export BASEPKG=${PKG}-${VER}
-export FULLPKG=${BASEPKG}-${REL}
+export FULLPKG=${PKG}-${VER}-${REL}

# determine correct decompression option and tarball filename
export src_orig_pkg_name=
@@ -178,7 +178,7 @@ install() {
      rm -f ${instdir}${f} ; \
    fi ;\
  done &&\
-  for d in ${prefix}/share/doc/${BASEPKG} ${prefix}/share/doc/Cygwin ; do \
+  for d in ${prefix}/share/doc/${PKG}-${VER} ${prefix}/share/doc/Cygwin ; do \
    if [ ! -d ${instdir}${d} ] ; then \
      mkdir -p ${instdir}${d} ;\
    fi ;\
@@ -201,14 +201,14 @@ install() {
  done && \
  if [ ! "x$templist" = "x" ]; then \
    /usr/bin/install -m 644 $templist \
-         ${instdir}${prefix}/share/doc/${BASEPKG} ; \
+         ${instdir}${prefix}/share/doc/${PKG}-${VER} ; \
  fi && \
  if [ -f ${srcdir}/CYGWIN-PATCHES/${PKG}.README ]; then \
    /usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/${PKG}.README \
-      ${instdir}${prefix}/share/doc/Cygwin/${BASEPKG}.README ; \
+      ${instdir}${prefix}/share/doc/Cygwin/${PKG}-${VER}.README ; \
  elif [ -f ${srcdir}/CYGWIN-PATCHES/README ] ; then \
    /usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/README \
-      ${instdir}${prefix}/share/doc/Cygwin/${BASEPKG}.README ; \
+      ${instdir}${prefix}/share/doc/Cygwin/${PKG}-${VER}.README ; \
  fi && \
  if [ -f ${srcdir}/CYGWIN-PATCHES/${PKG}.sh ] ; then \
    if [ ! -d ${instdir}${sysconfdir}/postinstall ]; then \



Number 2:
Use "xargs --no-run-if-empty". I don't recall for what package I needed this, but I've had it locally
for some time. In any case, it is good bulletproofing.

Index: generic-build-script
===================================================================
RCS file: /home/mirror/cvsmirror/cygwin-apps-cvs/packaging/templates/generic-build-script,v
retrieving revision 1.29
diff -u -p -r1.29 generic-build-script
--- generic-build-script        14 Oct 2004 22:55:26 -0000      1.29
+++ generic-build-script        21 Jun 2005 21:30:29 -0000
@@ -189,7 +189,7 @@ install() {
  if [ -d ${instdir}${prefix}/share/man ] ; then \
    find ${instdir}${prefix}/share/man -name "*.1" -o -name "*.3" -o \
      -name "*.3x" -o -name "*.3pm" -o -name "*.5" -o -name "*.6" -o \
-      -name "*.7" -o -name "*.8" | xargs gzip -q ; \
+      -name "*.7" -o -name "*.8" | xargs --no-run-if-empty gzip -q ; \
  fi && \
  templist="" && \
  for fp in ${install_docs} ; do \



Max.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]