]> git.pld-linux.org Git - packages/ossp-uuid.git/blobdiff - ossp-uuid.spec
- fix typo oosp-uuid to ossp-uuid
[packages/ossp-uuid.git] / ossp-uuid.spec
index 69a2d60beeaa53b3d319a24d97febaaf0f62063e..dc7be20d4e9c95ba6c430af486f29fa989cd6d79 100644 (file)
@@ -1,23 +1,21 @@
 # TODO
-# - rename include ossp/uuid.h?
-# - rename package to ossp-uuid?
 # - fix bindings compilation (when library is not installed)
 #
 # Conditional build:
-%bcond_without php             # build PHP binding
-%bcond_with    perl            # build Perl binding
-%bcond_without pgsql           # build postgresql binding
+%bcond_with            php                     # build PHP binding
+%bcond_with            perl            # build Perl binding
+%bcond_with            pgsql           # build postgresql binding
 #
 Summary:       Universally Unique Identifier library
-Name:          uuid
-Version:       1.6.1
-Release:       1
+Name:          ossp-uuid
+Version:       1.6.2
+Release:       7
 License:       MIT
 Group:         Libraries
 URL:           http://www.ossp.org/pkg/lib/uuid/
-Source0:       ftp://ftp.ossp.org/pkg/lib/uuid/%{name}-%{version}.tar.gz
-# Source0-md5: 18c8875411da07fe4503fdfc2136bf46
-Patch0:                %{name}-ossp-prefix.patch
+Source0:       ftp://ftp.ossp.org/pkg/lib/uuid/uuid-%{version}.tar.gz
+# Source0-md5: 5db0d43a9022a6ebbbc25337ae28942f
+Patch0:                uuid-ossp-prefix.patch
 BuildRequires: libtool
 %{?with_php:BuildRequires:     php-devel >= 3:5.0.0}
 %{?with_pgsql:BuildRequires:   postgresql-devel}
@@ -77,40 +75,41 @@ Requires:   %{name}-devel = %{version}-%{release}
 %description dce-devel
 DCE development headers and libraries for OSSP uuid.
 
-%package -n perl-%{name}
+%package -n perl-uuid
 Summary:       OSSP uuid Perl Binding
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
-%description -n perl-%{name}
+%description -n perl-uuid
 Perl OSSP uuid modules, which includes a Data::UUID replacement.
 
-%package -n php-%{name}
+%package -n php-uuid
 Summary:       PHP support for Universally Unique Identifier library
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 %{?requires_php_extension}
 Requires:      php-common >= 4:5.0.4
 
-%description -n php-%{name}
+%description -n php-uuid
 UUID is a PHP extension for the creation of Universally Unique
 Identifiers (UUID).
 
-%package -n postgresql-%{name}
+%package -n postgresql-uuid
 Summary:       OSSP uuid bindings for PostgreSQL
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
-%description -n postgresql-%{name}
+%description -n postgresql-uuid
 PostgreSQL OSSP uuid module.
 
 %prep
-%setup -q
+%setup -q -n uuid-%{version}
 %patch0 -p1
 
 %build
 # Build the library.
 %configure \
+       --includedir=%{_includedir}/ossp-uuid \
        --disable-static \
        --with-dce \
        --with-cxx \
@@ -122,14 +121,18 @@ PostgreSQL OSSP uuid module.
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/%{_lib}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
 %if %{with php}
 install -d $RPM_BUILD_ROOT%{_datadir}/php
-mv $RPM_BUILD_ROOT{%{php_extensiondir},%{_datadir}/php}/%{name}.php
+mv $RPM_BUILD_ROOT{%{php_extensiondir},%{_datadir}/php}/uuid.php
 %endif
 
+mv -f $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so.* $RPM_BUILD_ROOT/%{_lib}
+ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libossp-uuid.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -146,14 +149,15 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog HISTORY NEWS PORTING README SEEALSO THANKS TODO USERS
 %attr(755,root,root) %{_bindir}/uuid
-%attr(755,root,root) %{_libdir}/libossp-uuid.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libossp-uuid.so.16
+%attr(755,root,root) /%{_lib}/libossp-uuid.so.*.*.*
+%attr(755,root,root) %ghost /%{_lib}/libossp-uuid.so.16
 %{_mandir}/man1/uuid.1*
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/uuid-config
-%{_includedir}/uuid.h
+%dir %{_includedir}/ossp-uuid
+%{_includedir}/ossp-uuid/uuid.h
 %{_libdir}/libossp-uuid.so
 %{_pkgconfigdir}/ossp-uuid.pc
 %{_mandir}/man3/ossp-uuid.3*
@@ -167,7 +171,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files c++-devel
 %defattr(644,root,root,755)
-%{_includedir}/uuid++.hh
+%{_includedir}/ossp-uuid/uuid++.hh
 %{_libdir}/libossp-uuid++.so
 %{_libdir}/libossp-uuid++.la
 %{_mandir}/man3/uuid++.3*
@@ -179,12 +183,12 @@ rm -rf $RPM_BUILD_ROOT
 
 %files dce-devel
 %defattr(644,root,root,755)
-%{_includedir}/uuid_dce.h
+%{_includedir}/ossp-uuid/uuid_dce.h
 %{_libdir}/libossp-uuid_dce.so
 %{_libdir}/libossp-uuid_dce.la
 
 %if %{with perl}
-%files -n perl-%{name}
+%files -n perl-uuid
 %defattr(644,root,root,755)
 %{perl_vendorarch}/auto/*
 %{perl_vendorarch}/Data*
@@ -194,14 +198,14 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %if %{with php}
-%files -n php-%{name}
+%files -n php-uuid
 %defattr(644,root,root,755)
 %{_libdir}/php/ossp-uuid.so
 %{_datadir}/php/uuid.php
 %endif
 
 %if %{with pgsql}
-%files -n postgresql-%{name}
+%files -n postgresql-uuid
 %defattr(644,root,root,755)
 %{_libdir}/postgresql/ossp-uuid.so
 %{_datadir}/postgresql/uuid.sql
This page took 0.113168 seconds and 4 git commands to generate.