commit 06daa883975dabf74735c515a00abb6e050037eb
Author: Elan Ruusamäe <[email protected]>
Date:   Mon Sep 5 18:24:05 2022 +0300

    Add vendor package

 geoipupdate.spec | 10 +++++++++-
 go-vendor.patch  | 11 +++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)
---
diff --git a/geoipupdate.spec b/geoipupdate.spec
index 6b2ff86..7e542ab 100644
--- a/geoipupdate.spec
+++ b/geoipupdate.spec
@@ -8,6 +8,13 @@ Group:         Applications/Networking
 #Source0Download: https://github.com/maxmind/geoipupdate/releases
 Source0:       
https://github.com/maxmind/geoipupdate/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5: edd364519222e99b1009aec7d7edfb40
+%if 0
+go mod vendor
+tar -caf ~/geoipupdate-vendor.tar.xz vendor
+%endif
+Source1:       %{name}-vendor-%{version}.tar.xz
+# Source1-md5: c232481778faf5d48bb9e6994d54ad82
+Patch0:                go-vendor.patch
 URL:           https://github.com/maxmind/geoipupdate
 BuildRequires: curl-devel
 BuildRequires: golang >= 1.3.1
@@ -30,7 +37,8 @@ danych GeoIP2 lub GeoIP Legacy. Obecnie program działa tylko 
na
 Linuksie i innych systemach uniksowych.
 
 %prep
-%setup -q
+%setup -q -a1
+%patch0 -p1
 
 %build
 %{__make} \
diff --git a/go-vendor.patch b/go-vendor.patch
new file mode 100644
index 0000000..c2adb35
--- /dev/null
+++ b/go-vendor.patch
@@ -0,0 +1,11 @@
+--- geoipupdate-4.9.0/Makefile~        2022-02-16 00:25:37.000000000 +0200
++++ geoipupdate-4.9.0/Makefile 2022-09-05 18:27:40.067617133 +0300
+@@ -41,7 +41,7 @@
+       mkdir -p $(BUILDDIR)
+ 
+ $(BUILDDIR)/geoipupdate: $(BUILDDIR)
+-      (cd cmd/geoipupdate && go build -ldflags '-X 
main.defaultConfigFile=$(CONFFILE) -X main.defaultDatabaseDirectory=$(DATADIR) 
-X "main.version=$(VERSION)"')
++      (cd cmd/geoipupdate && go build -mod=vendor -ldflags '-X 
main.defaultConfigFile=$(CONFFILE) -X main.defaultDatabaseDirectory=$(DATADIR) 
-X "main.version=$(VERSION)"')
+       cp cmd/geoipupdate/geoipupdate $(BUILDDIR)
+ 
+ $(BUILDDIR)/GeoIP.conf: $(BUILDDIR) conf/GeoIP.conf.default
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/geoipupdate.git/commitdiff/4971c447f1c8f1307c34cc0287ae8a7f685af082

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to