This is the mail archive of the cygwin 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]

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


Hi,

the build-script of the smartmontools package creates the "Cygwin/package-*.README" file from "srcdir/CYGWIN-PATCHES/package.README.in" by replacing VER/REL with the current version/release numbers.

This might be useful for other packages to avoid extra editing of README on each minor release.

A patch for generic-build-script 1.43 is attached.

Christian

--- generic-build-script.orig	Sat Nov 12 15:21:55 2005
+++ generic-build-script	Fri Nov 18 10:54:58 2005
@@ -220,9 +220,16 @@
   mkdir -p ${objdir} && \
   conf )
 }
+buildreadme() {
+  sed "s/<VER>/${VER}/g;s/<REL>/${REL}/g"
+}
 build() {
   (cd ${objdir} && \
-  make CFLAGS="${MY_CFLAGS}" 2>&1 | tee ${makelogfile} )
+  make CFLAGS="${MY_CFLAGS}" 2>&1 | tee ${makelogfile} && \
+  if [ -f ${srcdir}/CYGWIN-PATCHES/${PKG}.README.in ]; then \
+    buildreadme < ${srcdir}/CYGWIN-PATCHES/${PKG}.README.in \
+      > ${objdir}/${FULLPKG}.README; \
+  fi )
 }
 check() {
   (cd ${objdir} && \
@@ -230,7 +237,8 @@
 }
 clean() {
   (cd ${objdir} && \
-  make clean )
+  make clean && \
+  rm -f ${objdir}/${FULLPKG}.README )
 }
 install() {
   (cd ${objdir} && \
@@ -269,8 +277,11 @@
     /usr/bin/install -m 644 $templist \
 	 ${instdir}${prefix}/share/doc/${SHORTPKG} ; \
   fi && \
-  if [ -f ${srcdir}/CYGWIN-PATCHES/${PKG}.README ]; then \
-    /usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/${PKG}.README \
+  if [ -f ${srcdir}/CYGWIN-PATCHES/${PKG}.README.in ]; then \
+    /usr/bin/install -m 644 ${objdir}/${FULLPKG}.README \
+      ${instdir}${prefix}/share/doc/Cygwin/${SHORTPKG}.README ; \
+  elif [ -f ${srcdir}/CYGWIN-PATCHES/${PKG}.README ]; then \
+    /usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/${PKG}.README ] \
       ${instdir}${prefix}/share/doc/Cygwin/${SHORTPKG}.README ; \
   elif [ -f ${srcdir}/CYGWIN-PATCHES/README ] ; then \
     /usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/README \

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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