%define pgsql 0 # commandline overrides: # rpm -ba|--rebuild --with 'xxx' %{?_with_pgsql: %{expand: %%global pgsql 1}} %{?_without_pgsql: %{expand: %%global pgsql 0}} %define name ossp_uuid %define version 1.6.2 %define release %mkrel 4 %define major 16 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d Name: %{name} Version: %{version} Release: %{release} Summary: OSSP uuid is a ISO-C:1999 application programming interface License: GPLv2+ Group: Development/C URL: http://www.ossp.org/pkg/lib/uuid/ Source: ftp://ftp.ossp.org/pkg/lib/uuid/uuid-%{version}.tar.gz Patch0: uuid-1.6.2-fix-perl-install.patch Patch1: uuid-1.6.2-fix-php-install.patch Patch2: uuid-1.6.2-fix-php-link.patch %if %{pgsql} BuildRequires: postgresql-devel %endif BuildRequires: perl-devel BuildRequires: php-devel BuildRequires: php-cli BuildRoot: %{_tmppath}/%{name}-%{version} %description OSSP uuid is a ISO-C:1999 application programming interface (API) and corresponding command line interface (CLI) for the generation of DCE 1.1, ISO/IEC 11578:1996 and IETF RFC-4122 compliant Universally Unique Identifier (UUID). It supports DCE 1.1 variant UUIDs of version 1 (time and node based), version 3 (name based, MD5), version 4 (random number based) and version 5 (name based, SHA-1). Additional API bindings are provided for the languages ISO-C++:1998, Perl:5 and PHP:4/5. Optional backward compatibility exists for the ISO-C DCE-1.1 and Perl Data::UUID APIs %package -n %{libname} Summary: Main library for ossp-uuid Group: System/Libraries Provides: %{name} = %{version}-%{release} %description -n %{libname} OSSP uuid is a ISO-C:1999 application programming interface (API) and corresponding command line interface (CLI) for the generation of DCE 1.1, ISO/IEC 11578:1996 and IETF RFC-4122 compliant Universally Unique Identifier (UUID). It supports DCE 1.1 variant UUIDs of version 1 (time and node based), version 3 (name based, MD5), version 4 (random number based) and version 5 (name based, SHA-1). Additional API bindings are provided for the languages ISO-C++:1998, Perl:5 and PHP:4/5. Optional backward compatibility exists for the ISO-C DCE-1.1 and Perl Data::UUID APIs %package -n %{develname} Summary: Header files for the ossp-uuid library Group: Development/C Requires: %{libname} = %{version} Provides: %{name}-devel = %{version}-%{release} Conflicts: libuuid-devel %description -n %{develname} OSSP uuid is a ISO-C:1999 application programming interface (API) and corresponding command line interface (CLI) for the generation of DCE 1.1, ISO/IEC 11578:1996 and IETF RFC-4122 compliant Universally Unique Identifier (UUID). It supports DCE 1.1 variant UUIDs of version 1 (time and node based), version 3 (name based, MD5), version 4 (random number based) and version 5 (name based, SHA-1). Additional API bindings are provided for the languages ISO-C++:1998, Perl:5 and PHP:4/5. Optional backward compatibility exists for the ISO-C DCE-1.1 and Perl Data::UUID APIs These are .h files. %package -n perl-OSSP-uuid Summary: Perl bindings for ossp-uuid Group: System/Libraries %description -n perl-OSSP-uuid This package contains perl bindings for %{name}. %package -n php-OSSP-uuid Summary: PHP bindings for ossp-uuid Group: System/Libraries %description -n php-OSSP-uuid This package contains php bindings for %{name}. %if %{pgsql} %package -n %{libname}-pgsql Summary: Postgresql library for ossp-uuid Group: System/Libraries Provides: %{name} = %{version}-%{release} %description -n %{libname}-pgsql OSSP uuid is a ISO-C:1999 application programming interface (API) and corresponding command line interface (CLI) for the generation of DCE 1.1, ISO/IEC 11578:1996 and IETF RFC-4122 compliant Universally Unique Identifier (UUID). It supports DCE 1.1 variant UUIDs of version 1 (time and node based), version 3 (name based, MD5), version 4 (random number based) and version 5 (name based, SHA-1). Additional API bindings are provided for the languages ISO-C++:1998, Perl:5 and PHP:4/5. Optional backward compatibility exists for the ISO-C DCE-1.1 and Perl Data::UUID APIs %endif %prep %setup -q -n uuid-%{version} %patch0 -p 1 %patch1 -p 1 %patch2 -p 0 %build export PHP_ACLOCAL=aclocal %configure2_5x \ %if %{pgsql} --with-pgsql \ %endif --with-perl \ --with-php %make %install %{__rm} -rf %{buildroot} %makeinstall_std PHP_EXTENSIONDIR=%{_libdir}/php/extensions %clean %{__rm} -rf %{buildroot} %if %{pgsql} %post -n %{libname}-pgsql /bin/ln -s %{_libdir}/postgresql/uuid.so %{_libdir}/postgresql/uuid-ossp.so %postun -n %{libname}-pgsql /bin/rm -f %{_libdir}/postgresql/uuid-ossp.so %endif %files %defattr(-,root,root) %doc OVERVIEW %{_bindir}/uuid %{_mandir}/man1/uuid.1* #if %{pgsql} #exclude %{_defaultdocdir}/lib64ossp_uuid16-pgsql/OVERVIEW #exclude %{_defaultdocdir}/lib64ossp_uuid16/OVERVIEW #endif %files -n %{libname} %defattr(-,root,root) %{_libdir}/libuuid.so.%{major}* %files -n %{develname} %defattr(-,root,root) %{_libdir}/pkgconfig/uuid.pc %{_includedir}/uuid.h %{_bindir}/uuid-config %{_libdir}/libuuid.so %{_libdir}/libuuid.a %{_libdir}/libuuid.la %{_mandir}/man1/uuid-config.1* %{_mandir}/man3/uuid.3* %files -n perl-OSSP-uuid %defattr(-,root,root) %{perl_vendorarch}/OSSP %{perl_vendorarch}/auto/OSSP %{_mandir}/man3/OSSP::uuid.3* %files -n php-OSSP-uuid %defattr(-,root,root) %{_libdir}/php/extensions/uuid.so %{_libdir}/php/extensions/uuid.php %if %{pgsql} %files -n %{libname}-pgsql %defattr(-,root,root) %{_libdir}/postgresql/uuid.so %{_usr}/share/postgresql/uuid.sql %endif %changelog * Thu Jan 13 2011 dmorgan <dmorgan> 1.6.2-4.mga1 + Revision: 16655 - Remove mdv macros - imported package ossp_uuid * Sat Jan 01 2011 Funda Wang <fwang@mandriva.org> 1.6.2-4mdv2011.0 + Revision: 627159 - fix link of php binding - use aclocal instead of its 1.7 version for phpize * Thu Dec 16 2010 Guillaume Rousse <guillomovitch@mandriva.org> 1.6.2-3mdv2011.0 + Revision: 622424 - add perl and php bindings * Tue Jul 13 2010 Luis Daniel Lucio Quiroz <dlucio@mandriva.org> 1.6.2-2mdv2011.0 + Revision: 551531 - bump release?\194 * Sat May 22 2010 Luis Daniel Lucio Quiroz <dlucio@mandriva.org> 1.6.2-1mdv2011.0 + Revision: 545712 - import ossp_uuid