]> git.pld-linux.org Git - packages/ossp-uuid.git/blobdiff - ossp-uuid.spec
- removed zero-sized .bs file
[packages/ossp-uuid.git] / ossp-uuid.spec
index d75ec30e004ff7b0641793097126a2b8cef7cf00..579464c70645e4c0feb79b9a182a154c33f8f5a4 100644 (file)
@@ -1,26 +1,31 @@
-# TODO
-# - conflicts with e2fsprogs uuid, rename libs with ossp prefix?
-# - rename include ossp/uuid.h?
-# - rename package to ossp-uuid?
-# - fix bindings compilation
 #
 # Conditional build:
-%bcond_with    php             # build with PHP binding
-%bcond_with    perl            # build with Perl binding
-%bcond_without pgsql           # build with postgresql binding
-#
+%bcond_without php             # don't build PHP binding
+%bcond_without perl            # don't build Perl binding
+%bcond_with    pgsql           # build postgresql binding
+%bcond_without  static_libs     # don't build static libraries
+
+%define                php_name        php55
 Summary:       Universally Unique Identifier library
-Name:          uuid
-Version:       1.5.1
-Release:       0.1
+Summary(pl.UTF-8):     Biblioteka unikalnych identyfikatorów UUID
+Name:          ossp-uuid
+Version:       1.6.2
+Release:       22
 License:       MIT
 Group:         Libraries
+Source0:       ftp://ftp.ossp.org/pkg/lib/uuid/uuid-%{version}.tar.gz
+# Source0-md5: 5db0d43a9022a6ebbbc25337ae28942f
+Patch0:                uuid-ossp-prefix.patch
+Patch1:                php3.patch
 URL:           http://www.ossp.org/pkg/lib/uuid/
-Source0:       ftp://ftp.ossp.org/pkg/lib/uuid/%{name}-%{version}.tar.gz
-# Source0-md5: d7df0c4cb02dad7ce3e1ec8fc669f724
+%{?with_php:BuildRequires:     %{php_name}-devel}
+%{?with_php:BuildRequires:     %{php_name}-program}
+BuildRequires: libstdc++-devel
 BuildRequires: libtool
-%{?with_php:BuildRequires:     php-devel}
+%{?with_perl:BuildRequires:    perl-devel}
+%{?with_pgsql:BuildRequires:   postgresql-backend-devel}
 %{?with_pgsql:BuildRequires:   postgresql-devel}
+BuildRequires: rpmbuild(macros) >= 1.519
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -34,41 +39,95 @@ 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.
 
+%description -l pl.UTF-8
+OSSP uuid to interfejs programistyczny (API) ISO-C:1999 i
+odpowiadający mu interfejs linii poleceń (CLI) do generowania
+całkowicie unikalnych identyfikatorów UUID (Universally Unique
+Identifier) zgodnych z DCE 1.1, ISO/IEC 11578:1996 i RFC 4122.
+Obsługuje wariant DCE 1.1 UUID-ów w wersji 1 (oparty na czasie i
+węzłach), w wersji 3 (oparty na nazwie i MD5), w wersji 4 (oparty na
+liczbach losowych) oraz w wersji 5 (oparty na nazwach i SHA-1).
+Załączone są dodatkowe wiązania API do języków ISO-C++:1998, Perl:5
+oraz PHP:4/5. Istnieje też opcjonalna warstwa kompatybilności dla API
+ISO-C DCE-1.1 i perlowego Data::UUID.
+
 %package devel
-Summary:       Development support for Universally Unique Identifier library
+Summary:       Development files for Universally Unique Identifier library
+Summary(pl.UTF-8):     Pliki programistyczne biblioteki OSSP uuid
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description devel
 Development headers and libraries for OSSP uuid.
 
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki OSSP uuid.
+
+%package static
+Summary:       Universally Unique Identifier library - static library
+Summary(pl.UTF-8):     Biblioteka statyczna OSSP uuid
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Universally Unique Identifier library - static library
+
+%description static -l pl.UTF-8
+Biblioteka statyczna OSSP uuid
+
 %package c++
 Summary:       C++ support for Universally Unique Identifier library
+Summary(pl.UTF-8):     Wiązania C++ dla biblioteki OSSP uuid
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description c++
-C++ libraries for OSSP uuid.
+C++ binding for OSSP uuid library.
+
+%description c++ -l pl.UTF-8
+Wiązania C++ dla biblioteki OSSP uuid.
 
 %package c++-devel
 Summary:       C++ development support for Universally Unique Identifier library
+Summary(pl.UTF-8):     Pliki programistyczne wiązania C++ biblioteki OSSP uuid
 Group:         Development/Libraries
 Requires:      %{name}-c++ = %{version}-%{release}
 Requires:      %{name}-devel = %{version}-%{release}
+Requires:      libstdc++-devel
 
 %description c++-devel
 C++ development headers and libraries for OSSP uuid.
 
+%description c++-devel -l pl.UTF-8
+Pliki programistyczne wiązania C++ biblioteki OSSP uuid.
+
+%package c++-static
+Summary:       C++ support for Universally Unique Identifier library - static library
+Summary(pl.UTF-8):     Wiązania C++ dla biblioteki OSSP uuid - biblioteka statyczna
+Group:         Development/Libraries
+Requires:      %{name}-c++-devel = %{version}-%{release}
+
+%description c++-static
+C++ support for Universally Unique Identifier library - static library
+
+%description c++-static -l pl.UTF-8
+Wiązania C++ dla biblioteki OSSP uuid - biblioteka statyczna
+
 %package dce
 Summary:       DCE support for Universally Unique Identifier library
+Summary(pl.UTF-8):     Obsługa DCE dla biblioteki OSSP uuid
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description dce
 DCE OSSP uuid library.
 
+%description dce -l pl.UTF-8
+Biblioteka DCE OSSP uuid.
+
 %package dce-devel
 Summary:       DCE development support for Universally Unique Identifier library
+Summary(pl.UTF-8):     Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid
 Group:         Development/Libraries
 Requires:      %{name}-dce = %{version}-%{release}
 Requires:      %{name}-devel = %{version}-%{release}
@@ -76,121 +135,210 @@ Requires:        %{name}-devel = %{version}-%{release}
 %description dce-devel
 DCE development headers and libraries for OSSP uuid.
 
-%package -n perl-%{name}
-Summary:       Perl support for Universally Unique Identifier library
+%description dce-devel -l pl.UTF-8
+Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid.
+
+%package dce-static
+Summary:       DCE development support for Universally Unique Identifier library - static library
+Summary(pl.UTF-8):     Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid - biblioteka statyczna
+Group:         Development/Libraries
+Requires:      %{name}-dce-devel = %{version}-%{release}
+
+%description dce-static
+DCE development support for Universally Unique Identifier library -
+static library
+
+%description dce-static -l pl.UTF-8
+Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid -
+biblioteka statyczna
+
+%package -n perl-uuid
+Summary:       OSSP uuid Perl Binding
+Summary(pl.UTF-8):     Perlowe wiązania biblioteki OSSP uuid
 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}
+%description -n perl-uuid -l pl.UTF-8
+Moduły Perla OSSP uuid, zawierające zamiennik Data::UUID.
+
+%package -n %{php_name}-uuid
 Summary:       PHP support for Universally Unique Identifier library
+Summary(pl.UTF-8):     Wiązania PHP dla biblioteki OSSP UUID
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
+%{?requires_php_extension}
 
-%description -n php-%{name}
-PHP OSSP uuid module.
+%description -n %{php_name}-uuid
+UUID is a PHP extension for the creation of Universally Unique
+Identifiers (UUID).
 
-%package -n postgresql-%{name}
-Summary:       PostgreSQL support for Universally Unique Identifier library
+%description -n %{php_name}-uuid -l pl.UTF-8
+UUID to rozrzeszenie PHP do tworzenia całkowicie unikalnych
+identyfikatorów UUID.
+
+%package -n postgresql-uuid
+Summary:       OSSP uuid bindings for PostgreSQL
+Summary(pl.UTF-8):     Wiązania OSSP uuid dla PostgreSQL-a
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
-%description -n postgresql-%{name}
+%description -n postgresql-uuid
 PostgreSQL OSSP uuid module.
 
+%description -n postgresql-uuid -l pl.UTF-8
+Moduł OSSP uuid dla PostgreSQL-a.
+
 %prep
-%setup -q
+%setup -q -n uuid-%{version}
+%patch0 -p1
+%patch1 -p1
 
 %build
 # Build the library.
 %configure \
-       --disable-static \
+       --includedir=%{_includedir}/ossp-uuid \
+       %{!?with_static_libs:--disable-static} \
        --with-dce \
        --with-cxx \
        --with%{!?with_perl:out}-perl \
-       --with%{!?with_php:out}-php \
+       --with%{!?with_php:out}-php PHP=php \
        --with%{!?with_pgsql:out}-pgsql
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/%{_lib}
+%{__make} install \
+       WITH_PHP=no \
+       WITH_PERL=no \
+       DESTDIR=$RPM_BUILD_ROOT
+
+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
+
+%if %{with perl}
+%{__make} pure_install \
+       -C perl \
+       INSTALLDIRS=vendor \
+       DESTDIR=$RPM_BUILD_ROOT
+
+rm $RPM_BUILD_ROOT%{perl_vendorarch}/OSSP/uuid.pod
+rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/OSSP/uuid/.packlist
+%endif
+
+%if %{with php}
+install -d $RPM_BUILD_ROOT{%{php_data_dir},%{php_sysconfdir}/conf.d}
 %{__make} install \
+       -C php \
+       -f Makefile.local \
+       EXTDIR=%{php_extensiondir} \
        DESTDIR=$RPM_BUILD_ROOT
 
+mv $RPM_BUILD_ROOT{%{php_extensiondir},%{php_data_dir}}/uuid.php
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{name}.ini
+; Enable %{name} extension module
+extension=%{name}.so
+EOF
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
 
-%post c++ -p /sbin/ldconfig
-%postun c++ -p /sbin/ldconfig
+%post  c++ -p /sbin/ldconfig
+%postun        c++ -p /sbin/ldconfig
 
-%post dce -p /sbin/ldconfig
-%postun dce -p /sbin/ldconfig
+%post  dce -p /sbin/ldconfig
+%postun        dce -p /sbin/ldconfig
 
 %files
 %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}/libuuid.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libuuid.so.15
-%{_mandir}/man1/*
+%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
-%{_libdir}/libuuid.so
-%{_pkgconfigdir}/uuid.pc
-%{_mandir}/man3/uuid.3*
-%{_libdir}/libuuid.la
+%attr(755,root,root) %{_libdir}/libossp-uuid.so
+%{_libdir}/libossp-uuid.la
+%dir %{_includedir}/ossp-uuid
+%{_includedir}/ossp-uuid/uuid.h
+%{_pkgconfigdir}/ossp-uuid.pc
+%{_mandir}/man1/uuid-config.1*
+%{_mandir}/man3/ossp-uuid.3*
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libossp-uuid.a
+%endif
 
 %files c++
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libuuid++.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libuuid++.so.15
+%attr(755,root,root) %{_libdir}/libossp-uuid++.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libossp-uuid++.so.16
 
 %files c++-devel
 %defattr(644,root,root,755)
-%{_includedir}/uuid++.hh
-%{_libdir}/libuuid++.so
-%{_libdir}/libuuid++.la
+%attr(755,root,root) %{_libdir}/libossp-uuid++.so
+%{_libdir}/libossp-uuid++.la
+%{_includedir}/ossp-uuid/uuid++.hh
 %{_mandir}/man3/uuid++.3*
 
+%if %{with static_libs}
+%files c++-static
+%defattr(644,root,root,755)
+%{_libdir}/libossp-uuid++.a
+%endif
+
 %files dce
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libuuid_dce.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libuuid_dce.so.15
+%attr(755,root,root) %{_libdir}/libossp-uuid_dce.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libossp-uuid_dce.so.16
 
 %files dce-devel
 %defattr(644,root,root,755)
-%{_includedir}/uuid_dce.h
-%{_libdir}/libuuid_dce.so
-%{_libdir}/libuuid_dce.la
+%attr(755,root,root) %{_libdir}/libossp-uuid_dce.so
+%{_libdir}/libossp-uuid_dce.la
+%{_includedir}/ossp-uuid/uuid_dce.h
+
+%if %{with static_libs}
+%files dce-static
+%defattr(644,root,root,755)
+%{_libdir}/libossp-uuid_dce.a
+%endif
 
 %if %{with perl}
-%files -n perl-%{name}
+%files -n perl-uuid
 %defattr(644,root,root,755)
-%{perl_vendorarch}/auto/*
-%{perl_vendorarch}/Data*
-%{perl_vendorarch}/OSSP*
-%{_mandir}/man3/Data::UUID.3*
+%dir %{perl_vendorarch}/OSSP
+%{perl_vendorarch}/OSSP/uuid.pm
+%dir %{perl_vendorarch}/auto/OSSP
+%dir %{perl_vendorarch}/auto/OSSP/uuid
+%attr(755,root,root) %{perl_vendorarch}/auto/OSSP/uuid/uuid.so
 %{_mandir}/man3/OSSP::uuid.3*
 %endif
 
 %if %{with php}
-%files -n php-%{name}
+%files -n %{php_name}-uuid
 %defattr(644,root,root,755)
-%{_libdir}/php/uuid.so
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{name}.ini
+%attr(755,root,root) %{php_extensiondir}/%{name}.so
+%{php_data_dir}/uuid.php
 %endif
 
 %if %{with pgsql}
-%files -n postgresql-%{name}
+%files -n postgresql-uuid
 %defattr(644,root,root,755)
-%{_libdir}/postgresql/uuid.so
+%attr(755,root,root) %{_libdir}/postgresql/ossp-uuid.so
 %{_datadir}/postgresql/uuid.sql
 %endif
This page took 0.14503 seconds and 4 git commands to generate.