%define name shhopt %define version 1.1.7 %define release 2mdk %define major 1 %define libname %mklibname %{name} %{major} Summary: Library for parsing command line options Name: %{name} Version: %{version} Release: %{release} URL: http://shh.thathost.com/pub-unix/ License: Artistic Source0: %{name}-%{version}.tar.bz2 Group: System/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-root %description C-functions for parsing command line options, both traditional one-character options, and GNU'ish --long-options. %package -n %{libname} Summary: Library for parsing command line options Group: System/Libraries %description -n %{libname} C-functions for parsing command line options, both traditional one-character options, and GNU'ish --long-options. %package -n %{libname}-devel Summary: Library and header files for the %{name} library Group: Development/C Provides: lib%{name}-devel = %{version} Provides: %{name}-devel Requires: %{libname} = %{version}-%{release} %description -n %{libname}-devel C-functions for parsing command line options, both traditional one-character options, and GNU'ish --long-options. %prep %setup -q -n %{name}-%{version} %build # make the shared library make SHARED="1" OPTIM="%{optflags} -D_REENTRANT -fPIC" # make the static library make OPTIM="%{optflags} -D_REENTRANT -fPIC" %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} # install the shared library make SHARED="1" INSTBASEDIR="%{buildroot}%{_prefix}" install # install the static library make INSTBASEDIR="%{buildroot}%{_prefix}" install %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %post -n %{libname}-devel -p /sbin/ldconfig %postun -n %{libname}-devel -p /sbin/ldconfig %files -n %{libname} %defattr(-,root,root) %doc CREDITS ChangeLog INSTALL README TODO %{_libdir}/*.so.* %files -n %{libname}-devel %defattr(-,root,root) %{_includedir}/* %{_libdir}/*.so %{_libdir}/*.a %changelog * Sat Nov 13 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.1.7-2mdk - rpmbuildupdated * Sun Oct 05 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.1.7-1mdk - initial cooker contrib