libfetch: create a versioned soname (#871).

This commit is contained in:
Juan RP 2015-02-16 11:00:40 +01:00
parent e6189f1d41
commit 7b1f053e57
3 changed files with 47 additions and 6 deletions

View File

@ -684,7 +684,7 @@ libvala-0.24.so.0 libvala-0.24.0_1
libvala-0.26.so.0 libvala-0.26.2_1
libSDL_net-1.2.so.0 SDL_net-1.2.7_1
libmodplug.so.1 libmodplug-0.8.8_1
libfetch.so libfetch-2.33_1
libfetch.so.2 libfetch-2.34_8
libneon.so.27 neon-0.29.5_1
libsvn_subr-1.so.0 libsvn-1.7.5_1
libsvn_diff-1.so.0 libsvn-1.7.5_1

View File

@ -0,0 +1,42 @@
--- Makefile.orig 2015-02-16 10:55:42.669519299 +0100
+++ Makefile 2015-02-16 10:58:21.278068828 +0100
@@ -1,5 +1,7 @@
prefix = /usr
DESTDIR =
+MAJOR = 2
+MINOR = 34
FETCH_WITH_INET6 = true
FETCH_WITH_OPENSSL = true
@@ -41,25 +43,27 @@ httperr.h: http.errors Makefile errlist.
libfetch.so: $(GEN) $(INCS) $(OBJS)
rm -f $@
- $(CC) $(LDFLAGS) $(OBJS) $(LDADD) -shared -fPIC -o $@
+ $(CC) $(LDFLAGS) $(OBJS) $(LDADD) -shared -fPIC -Wl,-soname=$@.$(MAJOR) -o $@.$(MAJOR).$(MINOR)
libfetch.a: $(GEN) $(INCS) $(OBJS)
rm -f $@
$(AR) rcs $@ $(OBJS)
clean:
- rm -f libfetch.so libfetch.a *.o $(GEN)
+ rm -f libfetch.so* libfetch.a *.o $(GEN)
.PHONY: clean
install: all
- $(INSTALL) -m 755 libfetch.so $(DESTDIR)$(prefix)/lib/libfetch.so
+ $(INSTALL) -m 755 libfetch.so.$(MAJOR).$(MINOR) $(DESTDIR)$(prefix)/lib/libfetch.so.$(MAJOR).$(MINOR)
+ ln -s libfetch.so.$(MAJOR).$(MINOR) $(DESTDIR)$(prefix)/lib/libfetch.so.$(MAJOR)
+ ln -s libfetch.so.$(MAJOR).$(MINOR) $(DESTDIR)$(prefix)/lib/libfetch.so
$(INSTALL) -m 644 libfetch.a $(DESTDIR)$(prefix)/lib/libfetch.a
$(INSTALL) -m 644 fetch.h $(DESTDIR)$(prefix)/include/fetch.h
$(INSTALL) -m 644 fetch.3 $(DESTDIR)$(prefix)/share/man/man3/fetch.3
.PHONY: install
uninstall:
- rm -f $(DESTDIR)$(prefix)/lib/libfetch.so
+ rm -f $(DESTDIR)$(prefix)/lib/libfetch.so*
rm -f $(DESTDIR)$(prefix)/lib/libfetch.a
rm -f $(DESTDIR)$(prefix)/include/fetch.h
rm -f $(DESTDIR)$(prefix)/share/man/man3/fetch.3

View File

@ -1,24 +1,23 @@
# Template file for 'libfetch'
pkgname=libfetch
version=2.34
revision=7
revision=8
build_style=gnu-makefile
makedepends="libressl-devel>=2.1.3"
short_desc="File Transfer Library for URLs"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.FreeBSD.org"
homepage="http://www.NetBSD.org"
license="Modified BSD"
distfiles="http://repo.voidlinux.eu/distfiles/${pkgname}-${version}.tar.xz"
checksum=4e6d4541f213c9ab42ea94d49c2573f0a6f54b04f14668530960f1424b04f722
shlib_provides="libfetch.so"
libfetch-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/share
vmove "usr/lib/*.a"
vmove usr/lib/*.a
vmove usr/lib/*.so
}
}