102 lines
2.8 KiB
RPMSpec
102 lines
2.8 KiB
RPMSpec
|
%define peardir %(pear config-get php_dir 2> /dev/null || echo %{_datadir}/pear)
|
||
|
%define xmldir /var/lib/pear
|
||
|
%global pear_name Crypt_Blowfish
|
||
|
%define name php-pear-Crypt-Blowfish
|
||
|
%define version 1.0.1
|
||
|
%define release 3
|
||
|
|
||
|
Name: %{name}
|
||
|
Version: %{version}
|
||
|
Release: %{release}%{?dist}
|
||
|
Summary: Allows for quick two-way blowfish encryption without requiring the Mcrypt PHP extension
|
||
|
License: PHP
|
||
|
Group: Development/Libraries
|
||
|
Source0: http://pear.php.net/get/Crypt_Blowfish-%{version}.tgz
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
|
||
|
URL: http://pear.php.net/package/Crypt_Blowfish
|
||
|
|
||
|
BuildRequires: php-pear(PEAR) >= 1.4.7
|
||
|
Provides: php-pear(%{pear_name}) = %{version}
|
||
|
|
||
|
#BuildRequires: PEAR::PEAR >= 1.4.7
|
||
|
|
||
|
BuildArch: noarch
|
||
|
|
||
|
%description
|
||
|
This package allows you to prefore two-way blowfish on the fly using only
|
||
|
PHP. This package does not require the Mcrypt PHP extension to work.
|
||
|
|
||
|
|
||
|
%prep
|
||
|
%setup -c -T
|
||
|
pear -v -c pearrc \
|
||
|
-d php_dir=%{peardir} \
|
||
|
-d doc_dir=/docs \
|
||
|
-d bin_dir=%{_bindir} \
|
||
|
-d data_dir=%{peardir}/data \
|
||
|
-d test_dir=%{peardir}/tests \
|
||
|
-d ext_dir=%{_libdir} \
|
||
|
-s
|
||
|
|
||
|
%build
|
||
|
|
||
|
%install
|
||
|
rm -rf %{buildroot}
|
||
|
pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0}
|
||
|
|
||
|
# Clean up unnecessary files
|
||
|
rm pearrc
|
||
|
rm -rf %{buildroot}/%{peardir}/.filemap
|
||
|
rm -rf %{buildroot}/%{peardir}/.lock
|
||
|
rm -rf %{buildroot}/%{peardir}/.registry
|
||
|
rm -rf %{buildroot}%{peardir}/.channels
|
||
|
|
||
|
rm -rf %{buildroot}/%{xmldir}/.filemap
|
||
|
rm -rf %{buildroot}/%{xmldir}/.lock
|
||
|
rm -rf %{buildroot}/%{xmldir}/.registry
|
||
|
rm -rf %{buildroot}/%{xmldir}/.channels
|
||
|
if [[ -f %{buildroot}%{xmldir}/.depdb ]] ;then
|
||
|
rm -rf %{buildroot}%{xmldir}/.depdb
|
||
|
fi
|
||
|
if [[ -f %{buildroot}{xmldir}/.depdblock ]] ;then
|
||
|
rm -rf %{buildroot}%{xmldir}/.depdblock
|
||
|
fi
|
||
|
|
||
|
|
||
|
# Install XML package description
|
||
|
mkdir -p %{buildroot}%{xmldir}
|
||
|
tar -xzf %{SOURCE0} package.xml
|
||
|
cp -p package.xml %{buildroot}%{xmldir}/Crypt_Blowfish.xml
|
||
|
|
||
|
%clean
|
||
|
rm -rf %{buildroot}
|
||
|
|
||
|
%post
|
||
|
pear install --nodeps --soft --force --register-only %{xmldir}/Crypt_Blowfish.xml >/dev/null || :
|
||
|
|
||
|
%postun
|
||
|
if [ "$1" -eq "0" ]; then
|
||
|
pear uninstall --nodeps --ignore-errors --register-only pear.php.net/Crypt_Blowfish >/dev/null || :
|
||
|
fi
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root)
|
||
|
|
||
|
%{peardir}/*
|
||
|
%{xmldir}/Crypt_Blowfish.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.
|
||
|
|
||
|
* Thu Jun 16 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.1-3.sme
|
||
|
- importing to buildsys pear packages for Horde [SME: 9600]
|
||
|
|
||
|
* Mon May 6 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 1.0.1-2
|
||
|
- updated spec file requires section, and left original info remarked.
|
||
|
|
||
|
* Sun May 5 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 1.0.1-1
|
||
|
- Original from pear-make-rpm-spec.
|
||
|
|