packages: ossp-uuid/ossp-uuid.spec - fix perl and php bindings (install our...

glen glen at pld-linux.org
Sun May 16 11:25:08 CEST 2010


Author: glen                         Date: Sun May 16 09:25:08 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix perl and php bindings (install ourselves, their makefile makes wrong assumptions)

---- Files affected:
packages/ossp-uuid:
   ossp-uuid.spec (1.16 -> 1.17) 

---- Diffs:

================================================================
Index: packages/ossp-uuid/ossp-uuid.spec
diff -u packages/ossp-uuid/ossp-uuid.spec:1.16 packages/ossp-uuid/ossp-uuid.spec:1.17
--- packages/ossp-uuid/ossp-uuid.spec:1.16	Sun May 16 10:33:53 2010
+++ packages/ossp-uuid/ossp-uuid.spec	Sun May 16 11:25:03 2010
@@ -3,10 +3,10 @@
 # - fix bindings compilation (when library is not installed)
 #
 # Conditional build:
-%bcond_with	php		# build PHP binding
-%bcond_with	perl		# build Perl binding
-%bcond_with	pgsql		# build postgresql binding
-#
+%bcond_without	php		# build PHP binding
+%bcond_without	perl		# build Perl binding
+%bcond_without	pgsql		# build postgresql binding
+
 Summary:	Universally Unique Identifier library
 Summary(pl.UTF-8):	Biblioteka unikalnych identyfikatorów UUID
 Name:		ossp-uuid
@@ -19,9 +19,10 @@
 Patch0:		uuid-ossp-prefix.patch
 URL:		http://www.ossp.org/pkg/lib/uuid/
 BuildRequires:	libtool
+%{?with_perl:BuildRequires:	perl-devel}
 %{?with_php:BuildRequires:	php-devel >= 3:5.0.0}
 %{?with_pgsql:BuildRequires:	postgresql-devel}
-BuildRequires:	rpmbuild(macros) >= 1.344
+BuildRequires:	rpmbuild(macros) >= 1.519
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -44,8 +45,8 @@
 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.
+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 files for Universally Unique Identifier library
@@ -170,16 +171,39 @@
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/%{_lib}
 %{__make} install \
+	WITH_PHP=no \
+	WITH_PERL=no \
 	DESTDIR=$RPM_BUILD_ROOT
 
-%if %{with php}
-install -d $RPM_BUILD_ROOT%{_datadir}/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
 
+%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
+rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/OSSP/uuid/uuid.bs
+%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
 
@@ -237,19 +261,20 @@
 %if %{with perl}
 %files -n perl-uuid
 %defattr(644,root,root,755)
-# XXX: FIXME
-%{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-uuid
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/php/ossp-uuid.so
-%{_datadir}/php/uuid.php
+%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}
@@ -265,6 +290,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.17  2010/05/16 09:25:03  glen
+- fix perl and php bindings (install ourselves, their makefile makes wrong assumptions)
+
 Revision 1.16  2010/05/16 08:33:53  qboosh
 - pl, unified
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ossp-uuid/ossp-uuid.spec?r1=1.16&r2=1.17&f=u



More information about the pld-cvs-commit mailing list