Fixed patch section of prep().
[mmh] / SPECS / build-nmh-cygwin
index 620836d..e7ce976 100755 (executable)
@@ -62,9 +62,6 @@ export REL=`echo $tscriptname | sed -e "s/${PKG}\-${VER}\([+-]\)/\1/"`
 # from the upstream package name, you will want to redefine BASEPKG.
 # Example: For Apache 2, BASEPKG=httpd-2.x.xx but SHORTPKG=apache2-2.x.xx
 #
-# Change from generic-build-script: added DISABLE_SETGID_MAIL=1 so that
-# install will not try to chgrp/chmod bin/inc.
-export DISABLE_SETGID_MAIL=1
 # Change from generic-build-script: added -${REL} to BASEPKG.
 export BASEPKG=${PKG}-${VER}${REL}
 export SHORTPKG=${PKG}-${VER}
@@ -237,12 +234,14 @@ mkdirs_log() {
 }
 
 # Unpack the original tarball, and get everything set up for this script.
+# Change from generic-build-script:  cd to ${srcdir} instead of ${topdir}.
+# Change from generic-build-script:  use -p1 instead of -p0 patch option.
 prep() {
   (cd ${topdir} && \
   unpack ${src_orig_pkg} && \
-  cd ${topdir} && \
+  cd ${srcdir} && \
   if [ -f ${src_patch} ] ; then \
-    patch -Z -p0 < ${src_patch} ;\
+    patch -Z -p1 < ${src_patch} ;\
   fi && \
   mkdirs )
 }