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

Re: [PATCH cygport] Make src packages which put files under /usr/src/package-version-release/


On 2014-04-24 15:42, Jon TURNEY wrote:
 From a previous discussion [1] on this subject, it seems to be that if this is
desirable, then source packages should be fixed rather than working around
this in setup.

Attached is a patch to cygport to do exactly that.

The downside is, if you then rebuild the package like that, you end up with /usr/src/NAME-VERSION-RELEASE/NAME-VERSION-RELEASE[.ARCH, as of today's git master], which seems a bit repetitive to me. What do you (and others) think about making the "topdir" also the "workdir" if the former is already of the form NAME-VERSION-RELEASE.ARCH, as per the attached patch instead?

(As an aside, how would a patch to move "Method one" and "Method two" to an
archive page be received?  It seems to me that they are not relevant to nearly
all new packages)

http://cygwin.com/ml/cygwin-apps/2013-06/msg00182.html


Yaakov

diff --git a/bin/cygport.in b/bin/cygport.in
index 388c7d6..bf23ca2 100755
--- a/bin/cygport.in
+++ b/bin/cygport.in
@@ -670,13 +670,18 @@ unset restrict
 #
 ################################################################################
 
-declare -r workdir="${top}/${PF}.${ARCH}";
+if [ "${top##*/}" = "${PF}.${ARCH}" ]
+then
+	declare -r workdir="${top}";
+else
+	declare -r workdir="${top}/${PF}.${ARCH}";
+fi
 declare -r srcdir="${workdir}/src";
 declare -r origsrcdir="${workdir}/origsrc";
 declare -r configdir="${workdir}/config";
 declare -r logdir="${workdir}/log";
 declare -r patchdir="${workdir}/patch";
-declare -r spkgdir="${workdir}/spkg";
+declare -r spkgdir="${workdir}/spkg/${PF}.${ARCH}";
 declare -r distdir="${workdir}/dist";
 
 SRC_DIR=${SRC_DIR:-${ORIG_PN:-${PN}}-${PV}};
diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index 6a21a42..a5bca08 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -460,8 +460,6 @@ __pkg_srcpkg() {
 		cp ${top}/${src} ${spkgdir};
 	done
 
-	cd ${spkgdir};
-
 	if __arg_bool SIG
 	then
 		if check_prog gpg
@@ -478,7 +476,9 @@ __pkg_srcpkg() {
 		fi
 	fi
 
-	tar Jcvf ${distdir}/${PN}/${PF}-src.tar.xz * || error "Source package creation failed"
+	cd ${spkgdir%/*};
+
+	tar Jcvf ${distdir}/${PN}/${PF}-src.tar.xz ${spkgdir##*/}/ || error "Source package creation failed"
 	echo;
 }
 

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