diff --git a/.cvsignore b/.cvsignore index e69de29..8743310 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +libpuzzle-0.11.tar.bz2 diff --git a/import.log b/import.log new file mode 100644 index 0000000..8fa1bc0 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +libpuzzle-0_11-4_fc11:HEAD:libpuzzle-0.11-4.fc11.src.rpm:1245746080 diff --git a/libpuzzle.spec b/libpuzzle.spec new file mode 100644 index 0000000..1652262 --- /dev/null +++ b/libpuzzle.spec @@ -0,0 +1,124 @@ +%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1) +%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}} + +Name: libpuzzle +Version: 0.11 +Release: 4%{?dist} +Summary: Library to quickly find visually similar images (gif, png, jpg) +Group: System Environment/Libraries +License: BSD +URL: http://libpuzzle.pureftpd.org/project/libpuzzle +Source0: http://download.pureftpd.org/pub/pure-ftpd/misc/libpuzzle/releases/%{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: gd-devel + +%description +The Puzzle library is designed to quickly find visually similar images +(gif, png, jpg), even if they have been resized, recompressed, +recolored or slightly modified. The library is free, lightweight yet +very fast, configurable, easy to use and it has been designed with +security in mind. + +%package -n php-%{name} +Summary: PHP extension for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: php-common +BuildRequires: php-devel + +%description -n php-%{name} +The %{name} native PHP extension for developing PHP applications that +use %{name}. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%prep +%setup -q + + +%build +%{__cat} <<'EOF' >libpuzzle.ini +extension=libpuzzle.so +EOF + +%configure --disable-static +%{__sed} -i.rpath -e 's|^\(hardcode_libdir_flag_spec=\).*|\1""|' libtool +%{__sed} -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +%{__make} %{?_smp_mflags} +%{__make} DESTDIR=%{_builddir}/%{name}-%{version} install INSTALL="install -p" + +%{__cp} -ra php php-plain +iconv -f iso8859-1 -t utf-8 php-plain/examples/similar/similar.php > similar.php && mv -f similar.php php-plain/examples/similar/similar.php +cd php/libpuzzle +phpize + +%ifarch x86_64 ppc64 +LDFLAGS="$LDFLAGS -L%{_builddir}/%{name}-%{version}/usr/lib64"; export LDFLAGS +%endif + +%{__sed} -i.rpath -e 's|\$ld_runpath_switch\$ai_p||g' configure +%configure --with-libpuzzle=%{_builddir}/%{name}-%{version}/usr +%{__sed} -i.rpath -e 's|^\(hardcode_libdir_flag_spec=\).*|\1""|' libtool +%{__sed} -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +%{__make} %{?_smp_mflags} + +cd - +%{__cp} php/libpuzzle/modules/%{name}.so php_%name.so +%{__rm} -rf php +%{__mv} php-plain php + +%install +%{__rm} -rf %{buildroot} +%{__install} -p -D -m0755 php_%{name}.so %{buildroot}/%{php_extdir}/%{name}.so +%{__make} install DESTDIR=%{buildroot} INSTALL="install -p" +find %{buildroot} -name '*.la' -exec rm -f {} ';' +%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d +%{__install} -p -m0644 libpuzzle.ini %{buildroot}%{_sysconfdir}/php.d/libpuzzle.ini + +%clean +%{__rm} -rf %{buildroot} + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING README THANKS +%{_libdir}/*.so.* +%{_mandir}/man8/* +%{_bindir}/* + +%files -n php-%{name} +%defattr(-,root,root,-) +%doc README-PHP php/libpuzzle/{README,CREDITS,LICENSE} php/examples/similar/*.{sql,php} +%config(noreplace) %{_sysconfdir}/php.d/%{name}.ini +%{php_extdir}/%{name}.so + +%files devel +%defattr(-,root,root,-) +%{_libdir}/*.so +%{_includedir}/* +%{_mandir}/man3/* + +%changelog +* Sun Jun 21 2009 Andrew Colin Kissa - 0.11-4 +- Consistent use of macros + +* Sun Jun 21 2009 Andrew Colin Kissa - 0.11-3 +- Fixes to issues raised by reviewer + +* Thu Jun 18 2009 Andrew Colin Kissa - 0.11-2 +- Fix rpmlint issues + +* Sun May 14 2009 Andrew Colin Kissa - 0.11-1 +- Initial release + diff --git a/sources b/sources index e69de29..00b324e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +f9edc7322c6f422be395244eefbda180 libpuzzle-0.11.tar.bz2