]> git.pld-linux.org Git - packages/ossp-uuid.git/blobdiff - ossp-uuid.spec
build with php55
[packages/ossp-uuid.git] / ossp-uuid.spec
index 4b7cad096c0b8ec8588f66d8bb54598b16b7c26d..2c3d57568e73c851fef471aad420a1cd04a548e7 100644 (file)
@@ -1,27 +1,28 @@
-# TODO
-# - fix bindings compilation (when library is not installed)
 #
 # Conditional build:
-%bcond_without php             # build PHP binding
-%bcond_without perl            # build Perl binding
-%bcond_without pgsql           # build 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
 Summary(pl.UTF-8):     Biblioteka unikalnych identyfikatorów UUID
 Name:          ossp-uuid
 Version:       1.6.2
-Release:       7
+Release:       18
 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/
-%{?with_php:BuildRequires:     /usr/bin/php}
+%{?with_php:BuildRequires:    %{php_name}-program}
+%{?with_php:BuildRequires:     %{php_name}-devel}
 BuildRequires: libstdc++-devel
 BuildRequires: libtool
 %{?with_perl:BuildRequires:    perl-devel}
-%{?with_php:BuildRequires:     php-devel >= 3:5.0.0}
 %{?with_pgsql:BuildRequires:   postgresql-backend-devel}
 %{?with_pgsql:BuildRequires:   postgresql-devel}
 BuildRequires: rpmbuild(macros) >= 1.519
@@ -62,6 +63,18 @@ 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
@@ -88,6 +101,18 @@ 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
@@ -113,6 +138,20 @@ DCE development headers and libraries for OSSP uuid.
 %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
@@ -125,19 +164,18 @@ Perl OSSP uuid modules, which includes a Data::UUID replacement.
 %description -n perl-uuid -l pl.UTF-8
 Moduły Perla OSSP uuid, zawierające zamiennik Data::UUID.
 
-%package -n php-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}
-Requires:      php-common >= 4:5.0.4
 
-%description -n php-uuid
+%description -n %{php_name}-uuid
 UUID is a PHP extension for the creation of Universally Unique
 Identifiers (UUID).
 
-%description -n php-uuid -l pl.UTF-8
+%description -n %{php_name}-uuid -l pl.UTF-8
 UUID to rozrzeszenie PHP do tworzenia całkowicie unikalnych
 identyfikatorów UUID.
 
@@ -156,16 +194,17 @@ Moduł OSSP uuid dla PostgreSQL-a.
 %prep
 %setup -q -n uuid-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 # Build the library.
 %configure \
        --includedir=%{_includedir}/ossp-uuid \
-       --disable-static \
+       %{!?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}
@@ -238,6 +277,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_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}/libossp-uuid++.so.*.*.*
@@ -250,6 +295,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_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}/libossp-uuid_dce.so.*.*.*
@@ -261,6 +312,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_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-uuid
 %defattr(644,root,root,755)
@@ -273,7 +330,7 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %if %{with php}
-%files -n php-uuid
+%files -n %{php_name}-uuid
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{name}.ini
 %attr(755,root,root) %{php_extensiondir}/%{name}.so
This page took 0.047689 seconds and 4 git commands to generate.