[packages/libfetch] - updated to 2.33 (based on alpinelinux 3.8 package)

qboosh qboosh at pld-linux.org
Mon Apr 6 11:22:57 CEST 2026


commit 8a2f784b1b8663f2e68c1594e13ba913b44cd880
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Apr 6 11:23:24 2026 +0200

    - updated to 2.33 (based on alpinelinux 3.8 package)

 libfetch-Makefile          | 93 ++++++++++++++++++++++++++++++++++++++++++++++
 libfetch.spec              | 18 +++++----
 makefile-user-cflags.patch | 17 ++++-----
 3 files changed, 111 insertions(+), 17 deletions(-)
---
diff --git a/libfetch.spec b/libfetch.spec
index e0a4bf5..97282ee 100644
--- a/libfetch.spec
+++ b/libfetch.spec
@@ -1,13 +1,16 @@
 Summary:	High-level interface for retreiving and uploading files using Uniform Resource Locators
 Summary(pl.UTF-8):	Wysokopoziomowy interfejs do pobierania i przesyłania plików z użyciem URI
 Name:		libfetch
-Version:	2.26
+Version:	2.33
 Release:	1
 License:	BSD
 Group:		Libraries
-Source0:	http://gogglesmm.googlecode.com/files/%{name}-%{version}-arch.tar.gz
-# Source0-md5:	256b7875cddb348d35a6a1817819a76f
+Source0:	https://sources.archlinux.org/other/libfetch/%{name}-%{version}.tar.gz
+# Source0-md5:	a176b94f7f30344ef8a71c047ca2136b
+# https://gitlab.alpinelinux.org/alpine/aports/-/raw/v3.8.5/main/libfetch/Makefile?ref_type=tags&inline=false
+Source1:	libfetch-Makefile
 Patch0:		makefile-user-cflags.patch
+URL:		https://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/libfetch/
 BuildRequires:	openssl-devel
 BuildRequires:	sed >= 4.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -46,17 +49,17 @@ Statyczna biblioteka libfetch.
 
 %prep
 %setup -q
+cp -p %{SOURCE1} Makefile.linux
 %patch -P0 -p1
 
-%{__sed} -i "s@^Q.*=.*@Q =@g" Makefile.linux
-
 %build
 %{__make} -f Makefile.linux \
 	USERCFLAGS="%{rpmcflags}" \
 	LDFLAGS="%{rpmcflags} %{rpmldflags}" \
 	CC="%{__cc}" \
 	LD="%{__cc}" \
-	AR="%{__ar}"
+	AR="%{__ar}" \
+	Q=
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -64,7 +67,8 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -f Makefile.linux install \
 	prefix="%{_prefix}" \
 	libdir="%{_libdir}" \
-	DESTDIR=$RPM_BUILD_ROOT
+	DESTDIR=$RPM_BUILD_ROOT \
+	Q=
 
 %clean
 rm -rf $RPM_BUILD_ROOT
diff --git a/libfetch-Makefile b/libfetch-Makefile
new file mode 100644
index 0000000..38ed969
--- /dev/null
+++ b/libfetch-Makefile
@@ -0,0 +1,93 @@
+prefix = /usr
+DESTDIR =
+DEBUG = false
+FETCH_WITH_INET6 = true
+FETCH_WITH_OPENSSL = true
+FETCH_WITH_LFS = true
+
+WARNINGS = -Wall -Wstrict-prototypes -Wsign-compare -Wchar-subscripts \
+	   -Wpointer-arith -Wcast-align -Wsign-compare
+CFLAGS   += -O2 -pipe -I. -fPIC $(WARNINGS)
+
+
+CFLAGS	+= -DFTP_COMBINE_CWDS -DNETBSD
+
+ifeq ($(strip $(FETCH_WITH_LFS)), true)
+CFLAGS+=	-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES
+endif
+
+ifeq ($(strip $(FETCH_WITH_INET6)), true)
+CFLAGS+=	-DINET6
+endif
+
+ifeq ($(strip $(FETCH_WITH_OPENSSL)), true)
+CFLAGS+=	-DWITH_SSL
+LDFLAGS=	-lssl -lcrypto
+endif
+
+ifeq ($(strip $(DEBUG)), true)
+CFLAGS += -g -DDEBUG
+else
+CFLAGS += -UDEBUG
+endif
+
+CC = $(CROSS_COMPILE)gcc
+LD = $(CROSS_COMPILE)gcc
+AR = $(CROSS_COMPILE)ar
+RANLIB = ranlib
+INSTALL = install -c -D
+
+OBJS= fetch.o common.o ftp.o http.o file.o
+INCS= fetch.h common.h
+GEN = ftperr.h httperr.h
+MAN = libdownload.3
+
+#pretty print!
+E = @echo
+Q = @
+
+all: libfetch.so libfetch.a
+	$(E) "  built with:  " $(CFLAGS)
+.PHONY: all
+
+%.o: %.c $(INCS) $(GEN)
+	$(E) "  compile   " $@
+	$(Q) $(CC) $(CFLAGS) -c $<
+
+ftperr.h: ftp.errors
+	$(E) "  generate  " $@
+	$(Q) ./errlist.sh ftp_errlist FTP ftp.errors > $@
+
+httperr.h: http.errors
+	$(E) "  generate  " $@
+	$(Q) ./errlist.sh http_errlist HTTP http.errors > $@
+
+libfetch.so: $(GEN) $(INCS) $(OBJS)
+	$(E) "  build     " $@
+	$(Q) rm -f $@
+	$(Q) $(LD) $(LDFLAGS) *.o -shared -o $@
+
+libfetch.a: $(GEN) $(INCS) $(OBJS)
+	$(E) "  build     " $@
+	$(Q) rm -f $@
+	$(Q) $(AR) rcs $@ *.o
+	$(Q) $(RANLIB) $@
+
+clean:
+	$(E) "  clean     "
+	$(Q) rm -f libfetch.so libfetch.a *.o $(GEN)
+.PHONY: clean
+
+install: all
+	$(Q) $(INSTALL) -m 755 libfetch.so $(DESTDIR)$(prefix)/lib/libfetch.so
+	$(Q) $(INSTALL) -m 644 libfetch.a $(DESTDIR)$(prefix)/lib/libfetch.a
+	$(Q) $(INSTALL) -m 644 fetch.h $(DESTDIR)$(prefix)/include/fetch.h
+	$(Q) $(INSTALL) -m 644 fetch.3 $(DESTDIR)$(prefix)/share/man/man3/fetch.3
+.PHONY: install
+
+uninstall:
+	$(Q) rm -f $(DESTDIR)$(prefix)/lib/libfetch.so
+	$(Q) rm -f $(DESTDIR)$(prefix)/lib/libfetch.a
+	$(Q) rm -f $(DESTDIR)$(prefix)/include/fetch.h
+	$(Q) rm -f $(DESTDIR)$(prefix)/share/man/man3/fetch.3
+.PHONY: uninstall
diff --git a/makefile-user-cflags.patch b/makefile-user-cflags.patch
index 70027b2..7d74fac 100644
--- a/makefile-user-cflags.patch
+++ b/makefile-user-cflags.patch
@@ -1,18 +1,15 @@
---- libfetch-2.26-orig/Makefile.linux	2009-11-19 17:27:00.000000000 +0100
-+++ libfetch-2.26/Makefile.linux	2010-04-17 14:18:16.360266787 +0200
-@@ -6,9 +6,10 @@
+--- libfetch-2.33/Makefile.linux.orig	2026-04-06 10:51:20.121678997 +0200
++++ libfetch-2.33/Makefile.linux	2026-04-06 11:02:14.834798778 +0200
+@@ -7,7 +7,7 @@ FETCH_WITH_LFS = true
  
  WARNINGS = -Wall -Wstrict-prototypes -Wsign-compare -Wchar-subscripts \
  	   -Wpointer-arith -Wcast-align -Wsign-compare
--CFLAGS   = -O2 -pipe -I. -fPIC $(WARNINGS) \
-+CFLAGS   = -I. -fPIC $(WARNINGS) \
- 	   -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES
+-CFLAGS   += -O2 -pipe -I. -fPIC $(WARNINGS)
++CFLAGS   += $(USERCFLAGS) -pipe -I. -fPIC $(WARNINGS)
  
-+CFLAGS  += $(USERCFLAGS)
- CFLAGS	+= -DFTP_COMBINE_CWDS -DNETBSD
  
- ifeq ($(strip $(FETCH_WITH_INET6)), true)
-@@ -75,15 +76,15 @@
+ CFLAGS	+= -DFTP_COMBINE_CWDS -DNETBSD
+@@ -79,15 +79,15 @@ clean:
  .PHONY: clean
  
  install: all
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libfetch.git/commitdiff/8a2f784b1b8663f2e68c1594e13ba913b44cd880



More information about the pld-cvs-commit mailing list