%define peardir /usr/share/pear %define xmldir /var/lib/pear %{!?pear_metadir: %global pear_metadir %{pear_phpdir}} %{!?__pear: %global __pear %{_bindir}/pear} %global pear_name Horde_Service_Facebook %global pear_channel pear.horde.org %define name php-horde-Horde-Service-Facebook %define version 2.0.9 %define release 2 Name: %{name} Version: %{version} Release: %{release}%{?dist} Summary: PEAR: Horde Facebook client License: BSD-2-Clause Group: Development/Libraries Source0: http://pear.horde.org/get/Horde_Service_Facebook-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) URL: http://pear.horde.org/package/Horde_Service_Facebook BuildRequires: php-pear(PEAR) >= 1.4.7 BuildRequires: php-channel(pear.horde.org) Requires: php-horde-Horde-Role >= 1.0.0 Requires: php-horde-Horde-Exception >= 2.0.0 Requires: php-horde-Horde-Exception < 3.0.0alpha1 Requires: php-horde-Horde-Http >= 2.0.0 Requires: php-horde-Horde-Http < 3.0.0alpha1 Requires: php-horde-Horde-Translation >= 2.0.0 Requires: php-horde-Horde-Translation < 3.0.0alpha1 Requires: php-horde-Horde-Support >= 2.0.0 Requires: php-horde-Horde-Support < 3.0.0alpha1 Requires: php-pear(PEAR) >= 1.7.0 Requires: php-channel(pear.horde.org) BuildArch: noarch BuildRequires: php-horde-Horde-Role BuildRequires: gettext Provides: %{name} = %{version} %description Client libraries for the Facebook REST API. %prep %setup -q -c cd %{pear_name}-%{version} # Don't install .po and .pot files # Remove checksum for .mo, as we regenerate them sed -e '/%{pear_name}.po/d' \ -e '/Horde_Other.po/d' \ -e '/%{pear_name}.mo/s/md5sum="[^"]*"//' \ ../package.xml >%{name}.xml touch -r ../package.xml %{name}.xml %build cd %{pear_name}-%{version} # Regenerate the locales for po in $(find locale -name \*.po) do msgfmt $po -o $(dirname $po)/$(basename $po .po).mo done %install cd %{pear_name}-%{version} %{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml # Clean up unnecessary files rm -rf %{buildroot}%{pear_metadir}/.??* # Install XML package description mkdir -p %{buildroot}%{pear_xmldir} install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} # Locales for loc in locale/{??,??_??} do lang=$(basename $loc) test -d %{buildroot}%{pear_datadir}/%{pear_name}/$loc \ && echo "%%lang(${lang%_*}) %{pear_datadir}/%{pear_name}/$loc" done | tee ../%{pear_name}.lang #%check #cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g) %post %{__pear} install --nodeps --soft --force --register-only \ %{pear_xmldir}/%{name}.xml >/dev/null || : %postun if [ $1 -eq 0 ] ; then %{__pear} uninstall --nodeps --ignore-errors --register-only \ %{pear_channel}/%{pear_name} >/dev/null || : fi %files -f %{pear_name}.lang %defattr(-,root,root) #%doc docs/Horde_Service_Facebook/* %doc %{pear_docdir}/%{pear_name} %{peardir}/* %{pear_xmldir}/%{name}.xml %changelog * Fri Jul 14 2023 BogusDateBot - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, by assuming the date is correct and changing the weekday. * Fri Jun 17 2016 Jean-Philipe Pialasse 2.0.9-2.sme - fix [SME: 9602] - new spec file to build in SME buildsys - inspired from Remi Collet php-horde-Service-Weather * Tue Apr 5 2016 John H. Bennett III - 2.0.9-1 - Updated to 2.0.9 * Sat May 2 2015 John H. Bennett III - 2.0.8-1 - Updated to 2.0.8 * Sat Jan 10 2015 John H. Bennett III - 2.0.7-1 - Updated to 2.0.7 * Wed Oct 16 2013 John H. Bennett III - 2.0.6-1 - Updated to 2.0.6 * Fri Aug 30 2013 John H. Bennett III - 2.0.5-1 - Updated to 2.0.5 * Tue Jun 4 2013 John H. Bennett III - 2.0.4-1 - Initial release for SME Server - Original build from pear make-rpm-spec