Blame SPECS/uuid.spec

f2ab0a
%define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
f2ab0a
%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
f2ab0a
f2ab0a
# Private libraries are not be exposed globally by RPM
f2ab0a
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{php_extdir}/.*\\.so$
f2ab0a
f2ab0a
#fix multilib - add wrapper and suffix to original files
f2ab0a
%if %{_lib} == lib64
f2ab0a
%global mlsuffix 64
f2ab0a
%else
f2ab0a
%global mlsuffix 32
f2ab0a
%endif
f2ab0a
f2ab0a
Name:           uuid
f2ab0a
Version:        1.6.2
f2ab0a
Release:        24%{?dist}
f2ab0a
Summary:        Universally Unique Identifier library
f2ab0a
License:        MIT
f2ab0a
Group:          System Environment/Libraries
f2ab0a
URL:            http://www.ossp.org/pkg/lib/uuid/
f2ab0a
Source0:        ftp://ftp.ossp.org/pkg/lib/uuid/uuid-%{version}.tar.gz
f2ab0a
Source1:        uuid-config-wrapper
f2ab0a
Patch0:         uuid-1.6.1-ossp.patch
f2ab0a
Patch1:         uuid-1.6.1-mkdir.patch
f2ab0a
Patch2:         uuid-1.6.2-php54.patch
f2ab0a
f2ab0a
# rhbz#829532
f2ab0a
Patch3:         uuid-1.6.2-hwaddr.patch
f2ab0a
f2ab0a
# do not strip binaries
f2ab0a
Patch4:         uuid-1.6.2-nostrip.patch
f2ab0a
Patch5: uuid-1.6.2-manfix.patch
f2ab0a
Patch6: uuid-1.6.2-multilibfix.patch
f2ab0a
f2ab0a
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f2ab0a
BuildRequires:  libtool
f2ab0a
f2ab0a
Obsoletes:      %{name}-pgsql < 1.6.2-24
f2ab0a
f2ab0a
%description
f2ab0a
OSSP uuid is a ISO-C:1999 application programming interface (API)
f2ab0a
and corresponding command line interface (CLI) for the generation
f2ab0a
of DCE 1.1, ISO/IEC 11578:1996 and RFC 4122 compliant Universally
f2ab0a
Unique Identifier (UUID). It supports DCE 1.1 variant UUIDs of version
f2ab0a
1 (time and node based), version 3 (name based, MD5), version 4
f2ab0a
(random number based) and version 5 (name based, SHA-1). Additional
f2ab0a
API bindings are provided for the languages ISO-C++:1998, Perl:5 and
f2ab0a
PHP:4/5. Optional backward compatibility exists for the ISO-C DCE-1.1
f2ab0a
and Perl Data::UUID APIs.
f2ab0a
f2ab0a
%package devel
f2ab0a
Summary:        Development support for Universally Unique Identifier library
f2ab0a
Group:          Development/Libraries
f2ab0a
Requires:       pkgconfig
f2ab0a
Requires:       %{name} = %{version}-%{release}
f2ab0a
f2ab0a
%description devel
f2ab0a
Development headers and libraries for OSSP uuid.
f2ab0a
f2ab0a
%package c++
f2ab0a
Summary:        C++ support for Universally Unique Identifier library
f2ab0a
Group:          System Environment/Libraries
f2ab0a
Requires:       %{name} = %{version}-%{release}
f2ab0a
f2ab0a
%description c++
f2ab0a
C++ libraries for OSSP uuid.
f2ab0a
f2ab0a
%package c++-devel
f2ab0a
Summary:        C++ development support for Universally Unique Identifier library
f2ab0a
Group:          Development/Libraries
f2ab0a
Requires:       %{name}-c++ = %{version}-%{release}
f2ab0a
Requires:       %{name}-devel = %{version}-%{release}
f2ab0a
f2ab0a
%description c++-devel
f2ab0a
C++ development headers and libraries for OSSP uuid.
f2ab0a
f2ab0a
%package perl
f2ab0a
Summary:        Perl support for Universally Unique Identifier library
f2ab0a
Group:          Development/Libraries
f2ab0a
BuildRequires:  perl(ExtUtils::MakeMaker)
f2ab0a
BuildRequires:  perl(Test::More)
f2ab0a
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
f2ab0a
Requires:       %{name} = %{version}-%{release}
f2ab0a
f2ab0a
%description perl
f2ab0a
Perl OSSP uuid modules, which includes a Data::UUID replacement.
f2ab0a
f2ab0a
%package php
f2ab0a
Summary:        PHP support for Universally Unique Identifier library
f2ab0a
Group:          Development/Libraries
f2ab0a
BuildRequires:  php-devel
f2ab0a
Requires:       %{name} = %{version}-%{release}
f2ab0a
%if 0%{?php_zend_api:1}
f2ab0a
Requires: php(zend-abi) = %{php_zend_api}
f2ab0a
Requires: php(api) = %{php_core_api}
f2ab0a
%else
f2ab0a
Requires: php-api = %{php_apiver}
f2ab0a
%endif
f2ab0a
f2ab0a
%description php
f2ab0a
PHP OSSP uuid module.
f2ab0a
f2ab0a
%package dce
f2ab0a
Summary:        DCE support for Universally Unique Identifier library
f2ab0a
Group:          Development/Libraries
f2ab0a
Requires:       %{name} = %{version}-%{release}
f2ab0a
f2ab0a
%description dce
f2ab0a
DCE OSSP uuid library.
f2ab0a
f2ab0a
%package dce-devel
f2ab0a
Summary:        DCE development support for Universally Unique Identifier library
f2ab0a
Group:          Development/Libraries
f2ab0a
Requires:       %{name}-dce = %{version}-%{release}
f2ab0a
Requires:       %{name}-devel = %{version}-%{release}
f2ab0a
f2ab0a
%description dce-devel
f2ab0a
DCE development headers and libraries for OSSP uuid.
f2ab0a
f2ab0a
%prep
f2ab0a
%setup -q
f2ab0a
%patch0 -p1
f2ab0a
%patch1 -p1
f2ab0a
%patch2 -p1 -b .php54
f2ab0a
%patch3 -p1 -b .hwaddr
f2ab0a
%patch4 -p1 -b .nostrip
f2ab0a
%patch5 -p1 -b .manfix
f2ab0a
%patch6 -p1 -b .multilibfix
f2ab0a
f2ab0a
%build
f2ab0a
# Build the library.
f2ab0a
export LIB_NAME=libossp-uuid.la
f2ab0a
export DCE_NAME=libossp-uuid_dce.la
f2ab0a
export CXX_NAME=libossp-uuid++.la
f2ab0a
export PHP_NAME=$(pwd)/php/modules/ossp-uuid.so
f2ab0a
export PGSQL_NAME=$(pwd)/pgsql/libossp-uuid.so
f2ab0a
export CFLAGS="$RPM_OPT_FLAGS"
f2ab0a
export CXXFLAGS="$RPM_OPT_FLAGS"
f2ab0a
%configure \
f2ab0a
    --disable-static \
f2ab0a
    --without-perl \
f2ab0a
    --without-php \
f2ab0a
    --with-dce \
f2ab0a
    --with-cxx \
f2ab0a
    --without-pgsql
f2ab0a
f2ab0a
make LIBTOOL=/usr/bin/libtool CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" %{?_smp_mflags}
f2ab0a
f2ab0a
# Build the Perl module.
f2ab0a
pushd perl
f2ab0a
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" COMPAT=1
f2ab0a
%{__perl} -pi -e 's/^\tLD_RUN_PATH=[^\s]+\s*/\t/' Makefile
f2ab0a
make %{?_smp_mflags}
f2ab0a
popd
f2ab0a
f2ab0a
# Build the PHP module.
f2ab0a
pushd php
f2ab0a
export PHP_RPATH=no
f2ab0a
phpize
f2ab0a
CFLAGS="$RPM_OPT_FLAGS -I.. -L.. -L../.libs"
f2ab0a
%configure --enable-uuid
f2ab0a
make CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" %{?_smp_mflags}
f2ab0a
popd
f2ab0a
f2ab0a
%install
f2ab0a
rm -rf $RPM_BUILD_ROOT
f2ab0a
f2ab0a
make install DESTDIR=$RPM_BUILD_ROOT
f2ab0a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la $RPM_BUILD_ROOT%{_libdir}/*.a
f2ab0a
chmod 755 $RPM_BUILD_ROOT%{_libdir}/*.so.*.*.*
f2ab0a
f2ab0a
# Install the Perl modules.
f2ab0a
pushd perl
f2ab0a
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
f2ab0a
f2ab0a
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
f2ab0a
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
f2ab0a
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
f2ab0a
f2ab0a
%{_fixperms} $RPM_BUILD_ROOT/*
f2ab0a
popd
f2ab0a
f2ab0a
# Install the PHP module.
f2ab0a
pushd php
f2ab0a
make install INSTALL_ROOT=$RPM_BUILD_ROOT
f2ab0a
rm -f $RPM_BUILD_ROOT%{php_extdir}/*.a
f2ab0a
popd
f2ab0a
f2ab0a
# Put the php config bit into place
f2ab0a
%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d
f2ab0a
%{__cat} << __EOF__ > %{buildroot}%{_sysconfdir}/php.d/%{name}.ini
f2ab0a
; Enable %{name} extension module
f2ab0a
extension=%{name}.so
f2ab0a
__EOF__
f2ab0a
f2ab0a
#multilib fix
f2ab0a
mv $RPM_BUILD_ROOT/%{_bindir}/%{name}-config $RPM_BUILD_ROOT/%{_bindir}/%{name}-config.%{mlsuffix}
f2ab0a
install %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}/%{name}-config
f2ab0a
f2ab0a
%check
f2ab0a
make check
f2ab0a
f2ab0a
pushd perl
f2ab0a
LD_LIBRARY_PATH=../.libs make test
f2ab0a
popd
f2ab0a
f2ab0a
pushd php
f2ab0a
LD_LIBRARY_PATH=../.libs make test
f2ab0a
popd
f2ab0a
# Simple extension load test (no test run in make test)
f2ab0a
LD_LIBRARY_PATH=.libs php -n -d extension_dir=php/modules -d extension=uuid.so -m | grep uuid
f2ab0a
f2ab0a
%clean
f2ab0a
rm -rf $RPM_BUILD_ROOT
f2ab0a
f2ab0a
%post -p /sbin/ldconfig
f2ab0a
f2ab0a
%post c++ -p /sbin/ldconfig
f2ab0a
f2ab0a
%post dce -p /sbin/ldconfig
f2ab0a
f2ab0a
%postun -p /sbin/ldconfig
f2ab0a
f2ab0a
%postun c++ -p /sbin/ldconfig
f2ab0a
f2ab0a
%postun dce -p /sbin/ldconfig
f2ab0a
f2ab0a
%files
f2ab0a
%defattr(-,root,root,-)
f2ab0a
%doc AUTHORS ChangeLog HISTORY NEWS PORTING README SEEALSO THANKS TODO USERS
f2ab0a
%{_bindir}/uuid
f2ab0a
%{_libdir}/libossp-uuid.so.*
f2ab0a
%{_mandir}/man1/*
f2ab0a
%exclude %{_mandir}/man1/uuid-config.*
f2ab0a
f2ab0a
%files devel
f2ab0a
%defattr(-,root,root,-)
f2ab0a
%{_bindir}/uuid-config*
f2ab0a
%{_includedir}/uuid.h
f2ab0a
%{_libdir}/libossp-uuid.so
f2ab0a
%{_libdir}/pkgconfig/ossp-uuid.pc
f2ab0a
%{_mandir}/man3/ossp-uuid.3*
f2ab0a
%{_mandir}/man1/uuid-config.*
f2ab0a
f2ab0a
%files c++
f2ab0a
%defattr(-,root,root,-)
f2ab0a
%{_libdir}/libossp-uuid++.so.*
f2ab0a
f2ab0a
%files c++-devel
f2ab0a
%defattr(-,root,root,-)
f2ab0a
%{_includedir}/uuid++.hh
f2ab0a
%{_libdir}/libossp-uuid++.so
f2ab0a
%{_mandir}/man3/uuid++.3*
f2ab0a
f2ab0a
%files perl
f2ab0a
%defattr(-,root,root,-)
f2ab0a
%{perl_vendorarch}/auto/*
f2ab0a
%{perl_vendorarch}/Data*
f2ab0a
%{perl_vendorarch}/OSSP*
f2ab0a
%{_mandir}/man3/Data::UUID.3*
f2ab0a
%{_mandir}/man3/OSSP::uuid.3*
f2ab0a
f2ab0a
%files php
f2ab0a
%defattr(-,root,root,-)
f2ab0a
%config(noreplace) %{_sysconfdir}/php.d/%{name}.ini
f2ab0a
%{php_extdir}/%{name}.so
f2ab0a
f2ab0a
%files dce
f2ab0a
%defattr(-,root,root,-)
f2ab0a
%{_libdir}/libossp-uuid_dce.so.*
f2ab0a
f2ab0a
%files dce-devel
f2ab0a
%defattr(-,root,root,-)
f2ab0a
%{_includedir}/uuid_dce.h
f2ab0a
%{_libdir}/libossp-uuid_dce.so
f2ab0a
f2ab0a
%changelog
f2ab0a
* Fri Nov 01 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.6.2-24
f2ab0a
- revert perl changes from last change
f2ab0a
f2ab0a
* Wed Oct 30 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.6.2-23
f2ab0a
- drop uuid-pgsql subpackage, it is outdated and does not work, use 
f2ab0a
  uuid-ossp module from postgresql-contrib instead
f2ab0a
f2ab0a
* Mon Sep 02 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.6.2-21
f2ab0a
- rebuild after php abi change
f2ab0a
f2ab0a
* Wed Jul 31 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.6.2-20
f2ab0a
- drop last man page change, that option is just for compatibility
f2ab0a
- fix NAME section of man pages to be whatis friendly
f2ab0a
f2ab0a
* Mon Jun 03 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.6.2-19
f2ab0a
- fix multilib issue
f2ab0a
f2ab0a
* Thu May 30 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.6.2-18
f2ab0a
- describe -r in man page
f2ab0a
f2ab0a
* Fri Mar 22 2013 Remi Collet <rcollet@redhat.com> - 1.6.2-17
f2ab0a
- rebuild for http://fedoraproject.org/wiki/Features/Php55
f2ab0a
f2ab0a
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-16
f2ab0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
f2ab0a
f2ab0a
* Tue Nov 06 2012 Michal Hlavinka <mhlavink@redhat.com> - 1.6.2-15
f2ab0a
- make uuid-php compatible with php 5.4 (#873594)
f2ab0a
f2ab0a
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-14
f2ab0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f2ab0a
f2ab0a
* Thu Jun 28 2012 Petr Pisar <ppisar@redhat.com> - 1.6.2-13
f2ab0a
- Perl 5.16 rebuild
f2ab0a
f2ab0a
* Tue Jun 19 2012 Michal Hlavinka <mhlavink@redhat.com> - 1.6.2-12
f2ab0a
- enforce usage of our c(xx)flags
f2ab0a
f2ab0a
* Tue Jun 19 2012 Michal Hlavinka <mhlavink@redhat.com> - 1.6.2-11
f2ab0a
- fix debuginfo
f2ab0a
f2ab0a
* Tue Jun 19 2012 Michal Hlavinka <mhlavink@redhat.com> - 1.6.2-10
f2ab0a
- fix generation of MAC address based uuids (#829532), 
f2ab0a
  patch by Philip Prindeville
f2ab0a
f2ab0a
* Fri Jun 08 2012 Petr Pisar <ppisar@redhat.com> - 1.6.2-9
f2ab0a
- Perl 5.16 rebuild
f2ab0a
f2ab0a
* Thu Jan 19 2012 Remi Collet <remi@fedoraproject.org> - 1.6.2-8
f2ab0a
- build against php 5.4, with patch
f2ab0a
- add filter_provides to avoid private-shared-object-provides shout.so
f2ab0a
- add minimal %%check for php extension
f2ab0a
f2ab0a
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-7
f2ab0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
f2ab0a
f2ab0a
* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.6.2-6
f2ab0a
- Perl mass rebuild
f2ab0a
f2ab0a
* Sat May 14 2011 Iain Arnell <iarnell@gmail.com> 1.6.2-5
f2ab0a
- fix php_zend_api check
f2ab0a
f2ab0a
* Thu Mar 03 2011 Karsten Hopp <karsten@redhat.com> 1.6.2-4
f2ab0a
- fix build
f2ab0a
f2ab0a
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-3
f2ab0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f2ab0a
f2ab0a
* Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.6.2-2
f2ab0a
- Mass rebuild with perl-5.12.0
f2ab0a
f2ab0a
* Wed Apr 21 2010 Michal Hlavinka <mhlavink@redhat.com> - 1.6.2-1
f2ab0a
- updated to 1.6.2
f2ab0a
- uuid-config man page moved to sub-package containing uuid-config (#562838)
f2ab0a
f2ab0a
* Mon Feb  1 2010 Stepan Kasal <skasal@redhat.com> - 1.6.1-10
f2ab0a
- silence rpmlint by using $(pwd) instead of shell variable RPM_SOURCE_DIR
f2ab0a
f2ab0a
* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 1.6.1-9
f2ab0a
- rebuild against perl 5.10.1
f2ab0a
f2ab0a
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.1-8
f2ab0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f2ab0a
f2ab0a
* Mon Jul 13 2009 Remi Collet <Fedora@FamilleCollet.com> - 1.6.1-7
f2ab0a
- rebuild for new PHP 5.3.0 ABI (20090626)
f2ab0a
- add PHP ABI check
f2ab0a
- use php_extdir
f2ab0a
- add php configuration file (/etc/php.d/uuid.ini)
f2ab0a
f2ab0a
* Thu May  7 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 1.6.1-6
f2ab0a
- Using plain old "Requires: pkgconfig" instead -- see my post to
f2ab0a
  fedora-devel-list made today.
f2ab0a
f2ab0a
* Mon May  4 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 1.6.1-5
f2ab0a
- Replace expensive %%{_libdir}/pkgconfig dependency in uuid-devel
f2ab0a
  with pkgconfig%%{_isa} for Fedora >= 11 (#484849).
f2ab0a
f2ab0a
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.1-4
f2ab0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f2ab0a
f2ab0a
* Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.6.1-3
f2ab0a
- Rebuild for new perl
f2ab0a
f2ab0a
* Thu Mar  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.6.1-2
f2ab0a
- forgot to cvs add patch
f2ab0a
f2ab0a
* Thu Mar  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.6.1-1
f2ab0a
- 1.6.1
f2ab0a
f2ab0a
* Thu Mar  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.6.0-4
f2ab0a
- rebuild for new perl
f2ab0a
f2ab0a
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.6.0-3
f2ab0a
- Autorebuild for GCC 4.3
f2ab0a
f2ab0a
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 1.6.0-2
f2ab0a
- Rebuild for selinux ppc32 issue.
f2ab0a
f2ab0a
* Tue Jul 24 2007 Steven Pritchard <steve@kspei.com> 1.6.0-1
f2ab0a
- Update to 1.6.0.
f2ab0a
- BR Test::More.
f2ab0a
f2ab0a
* Tue Apr 17 2007 Steven Pritchard <steve@kspei.com> 1.5.1-3
f2ab0a
- Fix find option order.
f2ab0a
- Use fixperms macro instead of our own chmod incantation.
f2ab0a
- BR ExtUtils::MakeMaker.
f2ab0a
f2ab0a
* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 1.5.1-2
f2ab0a
 - rebuilt for unwind info generation, broken in gcc-4.1.1-21
f2ab0a
f2ab0a
* Mon Aug 28 2006 Steven Pritchard <steve@kspei.com> 1.5.1-1
f2ab0a
- Update to 1.5.1.
f2ab0a
f2ab0a
* Sat Jul 29 2006 Steven Pritchard <steve@kspei.com> 1.5.0-1
f2ab0a
- Update to 1.5.0.
f2ab0a
- Rename libuuid* to libossp-uuid*, uuid.3 to ossp-uuid.3, and uuid.pc
f2ab0a
  to ossp-uuid.pc to avoid conflicts with e2fsprogs-devel (#198520).
f2ab0a
- Clean out the pgsql directory.  (Some cruft shipped with this release.)
f2ab0a
f2ab0a
* Wed May 24 2006 Steven Pritchard <steve@kspei.com> 1.4.2-4
f2ab0a
- Remove static php module.
f2ab0a
f2ab0a
* Tue May 23 2006 Steven Pritchard <steve@kspei.com> 1.4.2-3
f2ab0a
- Force use of system libtool.
f2ab0a
- Make libs executable.
f2ab0a
f2ab0a
* Tue May 23 2006 Steven Pritchard <steve@kspei.com> 1.4.2-2
f2ab0a
- License is MIT(-ish).
f2ab0a
f2ab0a
* Fri May 19 2006 Steven Pritchard <steve@kspei.com> 1.4.2-1
f2ab0a
- Initial packaging attempt.