mirror of
https://abf.rosa.ru/djam/php-pear-HTTP_WebDAV_Server.git
synced 2025-02-23 14:22:55 +00:00
- spec cleanup
- use pear installer - don't ship tests, even in documentation - own all directories - use rpm filetriggers starting from mandriva 2010.1 SILENT: svn-revision: 477902
This commit is contained in:
parent
1765201a95
commit
759784e2c5
1 changed files with 31 additions and 53 deletions
|
@ -1,16 +1,15 @@
|
||||||
%define _class HTTP
|
%define _class HTTP
|
||||||
%define _subclass WebDAV
|
%define _subclass WebDAV
|
||||||
%define _status beta
|
%define upstream_name %{_class}_%{_subclass}_Server
|
||||||
%define _pearname %{_class}_%{_subclass}_Server
|
|
||||||
|
|
||||||
Summary: %{_pearname} - WebDAV Server Baseclass
|
Name: php-pear-%{upstream_name}
|
||||||
Name: php-pear-%{_pearname}
|
|
||||||
Version: 0.99.1
|
Version: 0.99.1
|
||||||
Release: %mkrel 11
|
Release: %mkrel 12
|
||||||
|
Summary: WebDAV Server Baseclass
|
||||||
License: PHP License
|
License: PHP License
|
||||||
Group: Development/PHP
|
Group: Development/PHP
|
||||||
Source0: http://pear.php.net/get/%{_pearname}-%{version}.tar.bz2
|
|
||||||
URL: http://pear.php.net/package/HTTP_WebDAV_Server/
|
URL: http://pear.php.net/package/HTTP_WebDAV_Server/
|
||||||
|
Source0: http://download.pear.php.net/package/%{upstream_name}-%{version}.tar.bz2
|
||||||
Requires(post): php-pear
|
Requires(post): php-pear
|
||||||
Requires(preun): php-pear
|
Requires(preun): php-pear
|
||||||
Requires: php-pear
|
Requires: php-pear
|
||||||
|
@ -18,69 +17,48 @@ Requires(post): php-pear
|
||||||
Requires(preun): php-pear
|
Requires(preun): php-pear
|
||||||
Requires: php-pear-HTTP >= 1.0
|
Requires: php-pear-HTTP >= 1.0
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: dos2unix
|
BuildRequires: php-pear
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
BuildRoot: %{_tmppath}/%{name}-%{version}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Mostly RFC2518 compliant helper class for WebDAV server
|
Mostly RFC2518 compliant helper class for WebDAV server
|
||||||
implementation.
|
implementation.
|
||||||
|
|
||||||
In PEAR status of this package is: %{_status}.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
|
||||||
%setup -q -c
|
%setup -q -c
|
||||||
|
mv package.xml %{upstream_name}-%{version}/%{upstream_name}.xml
|
||||||
find . -type d -perm 0700 -exec chmod 755 {} \;
|
|
||||||
find . -type f -perm 0555 -exec chmod 755 {} \;
|
|
||||||
find . -type f -perm 0444 -exec chmod 644 {} \;
|
|
||||||
|
|
||||||
for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
|
|
||||||
if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null
|
|
||||||
done
|
|
||||||
|
|
||||||
# strip away annoying ^M
|
|
||||||
find -type f | grep -v ".gif" | grep -v ".png" | grep -v ".jpg" | xargs dos2unix -U
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
install -d %{buildroot}%{_datadir}/pear/%{_class}/%{_subclass}/{db,Server,Tools}
|
cd %{upstream_name}-%{version}
|
||||||
|
pear install --nodeps --packagingroot %{buildroot} %{upstream_name}.xml
|
||||||
|
rm -rf %{buildroot}%{_datadir}/pear/.??*
|
||||||
|
|
||||||
install %{_pearname}-%{version}/*.php %{buildroot}%{_datadir}/pear/%{_class}/%{_subclass}
|
rm -rf %{buildroot}%{_datadir}/pear/docs
|
||||||
install %{_pearname}-%{version}/Server/*.php %{buildroot}%{_datadir}/pear/%{_class}/%{_subclass}/Server
|
rm -rf %{buildroot}%{_datadir}/pear/tests
|
||||||
install %{_pearname}-%{version}/db/*.sql %{buildroot}%{_datadir}/pear/%{_class}/%{_subclass}/db
|
|
||||||
install %{_pearname}-%{version}/Tools/*.php %{buildroot}%{_datadir}/pear/%{_class}/%{_subclass}/Tools
|
|
||||||
|
|
||||||
install -d %{buildroot}%{_datadir}/pear/packages
|
install -d %{buildroot}%{_datadir}/pear/packages
|
||||||
install -m0644 package.xml %{buildroot}%{_datadir}/pear/packages/%{_pearname}.xml
|
install -m 644 %{upstream_name}.xml %{buildroot}%{_datadir}/pear/packages
|
||||||
|
|
||||||
%post
|
|
||||||
if [ "$1" = "1" ]; then
|
|
||||||
if [ -x %{_bindir}/pear -a -f %{_datadir}/pear/packages/%{_pearname}.xml ]; then
|
|
||||||
%{_bindir}/pear install --nodeps -r %{_datadir}/pear/packages/%{_pearname}.xml
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ "$1" = "2" ]; then
|
|
||||||
if [ -x %{_bindir}/pear -a -f %{_datadir}/pear/packages/%{_pearname}.xml ]; then
|
|
||||||
%{_bindir}/pear upgrade -f --nodeps -r %{_datadir}/pear/packages/%{_pearname}.xml
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
%preun
|
|
||||||
if [ "$1" = 0 ]; then
|
|
||||||
if [ -x %{_bindir}/pear -a -f %{_datadir}/pear/packages/%{_pearname}.xml ]; then
|
|
||||||
%{_bindir}/pear uninstall --nodeps -r %{_pearname}
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%post
|
||||||
|
%if %mdkversion < 201000
|
||||||
|
pear install --nodeps --soft --force --register-only \
|
||||||
|
%{_datadir}/pear/packages/%{upstream_name}.xml >/dev/null || :
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%if %mdkversion < 201000
|
||||||
|
if [ "$1" -eq "0" ]; then
|
||||||
|
pear uninstall --nodeps --ignore-errors --register-only \
|
||||||
|
%{pear_name} >/dev/null || :
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(644,root,root,755)
|
%defattr(-,root,root)
|
||||||
%{_datadir}/pear/%{_class}/%{_subclass}/*.php
|
%{_datadir}/pear/%{_class}
|
||||||
%{_datadir}/pear/%{_class}/%{_subclass}
|
%{_datadir}/pear/packages/%{upstream_name}.xml
|
||||||
%{_datadir}/pear/packages/%{_pearname}.xml
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue