SPECS: libstrlcpy.spec - add soname (thx arekm)

glen glen at pld-linux.org
Mon Oct 3 17:45:59 CEST 2005


Author: glen                         Date: Mon Oct  3 15:45:59 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- add soname (thx arekm)

---- Files affected:
SPECS:
   libstrlcpy.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SPECS/libstrlcpy.spec
diff -u SPECS/libstrlcpy.spec:1.1 SPECS/libstrlcpy.spec:1.2
--- SPECS/libstrlcpy.spec:1.1	Mon Oct  3 17:42:03 2005
+++ SPECS/libstrlcpy.spec	Mon Oct  3 17:45:54 2005
@@ -3,7 +3,7 @@
 Name:		libstrlcpy
 %define		_snap 20050808
 Version:	0.%{_snap}
-Release:	0.1
+Release:	0.2
 License:	BSD
 Group:		Libraries
 Source0:	ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/strlcpy.c
@@ -15,23 +15,27 @@
 URL:		http://mail.gnome.org/archives/gtk-list/2000-April/msg00249.html
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		soname %{name}.0
+
 %description
 strlcpy and strlcat - consistent, safe, string copy and concatenation.
 
 %prep
 %setup -q -c -T
 cp %{SOURCE0} .
+cp %{SOURCE1} .
 
 %build
 gcc %{rpmcflags} -c strlcpy.c
 gcc %{rpmcflags} -c strlcat.c
-gcc %{rpmldflags} strlcpy.o strlcat.o -o %{name}.so -shared
+gcc %{rpmldflags} -Wl,-soname,%{soname} -shared strlcpy.o strlcat.o -o %{soname}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_libdir},%{_mandir}/man3}
-install %{name}.so $RPM_BUILD_ROOT%{_libdir}
-install %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man3
+ln -s %{soname} $RPM_BUILD_ROOT%{_libdir}/%{name}.so
+install %{soname} $RPM_BUILD_ROOT%{_libdir}
+install %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man3
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -42,6 +46,7 @@
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/*.so
+%attr(755,root,root) %{_libdir}/%{soname}
 %{_mandir}/man3/*
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -50,6 +55,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2005/10/03 15:45:54  glen
+- add soname (thx arekm)
+
 Revision 1.1  2005/10/03 15:42:03  glen
 - version is taken from cvs rcs date tag and most recent from both of the files
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/libstrlcpy.spec?r1=1.1&r2=1.2&f=u




More information about the pld-cvs-commit mailing list