Message-ID: <437E206C.3080906@t-online.de> Date: Fri, 18 Nov 2005 19:41:48 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: generic-build-script extension to update version numbers in README Content-Type: multipart/mixed; boundary="------------080206020309090207060404" X-ID: GWqqNaZVweZL371lOV2OdHJ1ivU+xIGsDiHOJO6j2cehz4VorDNRYU X-TOI-MSGID: ddbfd28a-b4b3-4c86-9351-949a4b9e3cbe X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------080206020309090207060404 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------080206020309090207060404 Content-Type: text/plain; name="generic-build-script_readme-patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="generic-build-script_readme-patch.txt" --- 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}/g;s//${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 \ --------------080206020309090207060404 Content-Type: text/plain; charset=us-ascii -- 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/ --------------080206020309090207060404--