%global gitver a3eca02f39be43fc7a7863d7782342d149ac69da %global gitshort %(echo %gitver | awk '{print substr($0,1,8)}') %global pkgname Syncroton Name: php-%{pkgname} Version: 0 Release: 0.1%{?gitver:.git%{gitshort}}%{?dist} Summary: PHP based implementation of the Exchange ActiveSync protocol License: GPLv3+ URL: http://www.syncroton.org Source0: %{pkgname}-%{gitshort}.tar.xz # Script to generate git snapshots # listed here so that it is pulled into the SRPM Source100: syncroton-snapshot.sh Patch1: 0001-Add-shebang-for-executable-PHP-scripts.patch Patch2: 0002-Fix-EOL-encoding.patch Requires: php-ZendFramework BuildArch: noarch %description %{summary}. Supported Devices: - iOS based devices - Android(> 2.3.3) based devices which use the stock Android Exchange client - Samsung Android(> 2.3.3) based devices - HTC Android(> 2.3.3) based devices - Windows Mobile phones - Nokia Mail for Exchange %package tests Summary: Unit Tests for Syncroton Requires: %{name} = %{version}-%{release} Requires: php-phpunit-PHPUnit %description tests Unit Tests for the Syncroton PHP library %prep %setup -q -n %{pkgname}-%{gitshort} %patch1 -p1 %patch2 -p1 %build # Nothing to build %install rm -rf $RPM_BUILD_ROOT chmod 0644 lib/Syncroton/Wbxml/Dtd/ActiveSync.php \ lib/Syncroton/Wbxml/Dtd/Factory.php \ lib/Syncroton/Wbxml/Dtd/Syncml.php \ lib/Syncroton/Backend/IFolder.php install -dm 0755 $RPM_BUILD_ROOT%{_datadir}/php # Copy library cp -a lib/Syncroton $RPM_BUILD_ROOT%{_datadir}/php/%{pkgname} cp -a tests $RPM_BUILD_ROOT%{_datadir}/php/%{pkgname} %files %doc index.php LICENSE docs/htaccess docs/syncroton.sql %{_datadir}/php/%{pkgname} %exclude %{_datadir}/php/%{pkgname}/tests %files tests %doc LICENSE %{_datadir}/php/%{pkgname}/tests %changelog * Thu Mar 14 2013 Felix Kaechele - 0-0.1.gita3eca02f - first version of package