Name: hs_regex Version: 3.8a Release: 1 Summary: regex - Henry Spencer's regular expression library Group: System Environment/Libraries License: BSD URL: http://www.arglist.com/regex/ Source0: http://www.arglist.com/regex/files/regex%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description regex - Henry Spencer's regular expression library. %package devel Summary: Development environment for hs_regex library Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel This package contains development files needed to develop hs_regex-based applications. %prep %setup -q -n regex %build # first build the 64-bit version export OBJECT_MODE=64 make %{?_smp_mflags} lib CreateExportList -X64 libregex.exp libregex.a ${CC} -qmkshrobj libregex.a -o shr64.o -bE:libregex.exp rm -f libregex.exp libregex.a mv shr64.o shr64.so make clean # now build the 32-bit version export OBJECT_MODE=32 make %{?_smp_mflags} lib CreateExportList libregex.exp libregex.a ${CC} -qmkshrobj libregex.a -o shr.o -bE:libregex.exp rm -f libregex.exp libregex.a /usr/bin/ar -X32 -rv libregex.a shr.o # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects mv shr64.so shr64.o /usr/bin/ar -X64 -q libregex.a shr64.o %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_libdir} mkdir -p ${RPM_BUILD_ROOT}%{_includedir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man3 mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man7 cp libregex.a ${RPM_BUILD_ROOT}%{_libdir} chmod 0644 ${RPM_BUILD_ROOT}%{_libdir}/* cp regex*.h ${RPM_BUILD_ROOT}%{_includedir} chmod 0644 ${RPM_BUILD_ROOT}%{_includedir}/* cp regex.3 ${RPM_BUILD_ROOT}%{_mandir}/man3 chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man3/* cp regex.7 ${RPM_BUILD_ROOT}%{_mandir}/man7 chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man7/* %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc COPYRIGHT README WHATSNEW %{_libdir}/*.a %files devel %defattr(-,root,system,-) %doc COPYRIGHT README WHATSNEW %{_includedir}/* %{_mandir}/man?/regex.? %changelog * Wed May 19 2010 Michael Perzl - 3.8a-1 - first version for AIX V5.1 and higher