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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Christian Franke
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/
Reply | Threaded
Open this post in threaded view
|

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

Igor Peshansky
On Fri, 18 Nov 2005, Christian Franke wrote:

> 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,

I'd like to discuss this patch, and cygwin-apps@ is the proper place for
this discussion.  It's nicer if the whole thread is on one list.  Would
you mind resubmitting this patch to cygwin-apps@?
        Igor
--
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_ [hidden email]
ZZZzz /,`.-'`'    -.  ;-;;,_ [hidden email]
     |,4-  ) )-,_. ,\ (  `'-' Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
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/