[med-svn] [Git][med-team/ncbi-entrez-direct][master] ncbi-entrez-direct 19.2.20230331+dfsg-2: Build cmd/*.go as main/*.go

Aaron M. Ucko (@ucko) gitlab at salsa.debian.org
Sun Sep 17 03:38:38 BST 2023



Aaron M. Ucko pushed to branch master at Debian Med / ncbi-entrez-direct


Commits:
191db126 by Aaron M. Ucko at 2023-09-16T22:36:02-04:00
ncbi-entrez-direct 19.2.20230331+dfsg-2: Build cmd/*.go as main/*.go

* debian/rules: Formally build cmd/*.go as main/*.go, adjusting DH_GOPKG
  accordingly.  This approach both avoids an FTBFS with Go 1.21 (under
  which cmd tries to pick up e.g. cmd/compile) and facilitates bypassing
  upstream's cmd/go.{mod,sum} without moving them aside.  (In
  retrospect, Built-Using was already missing third-party packages.)
* Reupload to unstable.

- - - - -


2 changed files:

- debian/changelog
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,14 @@
+ncbi-entrez-direct (19.2.20230331+dfsg-2) unstable; urgency=medium
+
+  * debian/rules: Formally build cmd/*.go as main/*.go, adjusting DH_GOPKG
+    accordingly.  This approach both avoids an FTBFS with Go 1.21 (under
+    which cmd tries to pick up e.g. cmd/compile) and facilitates bypassing
+    upstream's cmd/go.{mod,sum} without moving them aside.  (In
+    retrospect, Built-Using was already missing third-party packages.)
+  * Reupload to unstable.
+
+ -- Aaron M. Ucko <ucko at debian.org>  Sat, 16 Sep 2023 22:36:01 -0400
+
 ncbi-entrez-direct (19.2.20230331+dfsg-1) experimental; urgency=medium
 
   * New upstream point release, still to experimental.


=====================================
debian/rules
=====================================
@@ -11,7 +11,7 @@ export CGO_CXXFLAGS = $(CXXFLAGS) # probably irrelevant
 export CGO_FFLAGS   = $(FFLAGS)   # even more so
 export CGO_LDFLAGS  = $(LDFLAGS)
 
-export DH_GOPKG = cmd
+export DH_GOPKG = main
 
 %:
 	dh $@ --with=golang,python3
@@ -130,11 +130,12 @@ endif
 $(BIN_GO_APPS): bin/%: cmd/%.go $(GOLIBS)
 # Always use gccgo?  The resulting binary would be much smaller, but
 # pull in a large shared library with few other reverse dependencies.
-	go build -v -gccgoflags '$(CFLAGS) $(LDFLAGS)' -o $@ cmd/$*.go
+	go build -v -gccgoflags '$(CFLAGS) $(LDFLAGS)' -o $@ \
+	    $(GOPATH)/src/$(DH_GOPKG)/$*.go
 
 override_dh_auto_configure:
-	mkdir -p saved
-	-mv cmd/go.mod cmd/go.sum saved/
+	mkdir -p $(GOPATH)/src/$(DH_GOPKG)
+	ln -sv $(CURDIR)/cmd/*.go $(GOPATH)/src/$(DH_GOPKG)
 
 override_dh_auto_build: $(WRAPPERS) $(BIN_PERL_SCRIPTS) \
                         $(BIN_ECOMMON_SCRIPTS) $(BIN_OTHER_SCRIPTS) \
@@ -164,4 +165,3 @@ override_dh_installexamples:
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -rf bin debian/edirect.py $(GOCACHE) $(GOPATH)
-	if [ -d saved ]; then mv saved/* cmd && rmdir saved; fi



View it on GitLab: https://salsa.debian.org/med-team/ncbi-entrez-direct/-/commit/191db126151a3310a8204eb2a1ad32c9cb7cdc3e

-- 
View it on GitLab: https://salsa.debian.org/med-team/ncbi-entrez-direct/-/commit/191db126151a3310a8204eb2a1ad32c9cb7cdc3e
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20230917/48c0be4e/attachment-0001.htm>


More information about the debian-med-commit mailing list