]> git.pld-linux.org Git - packages/phpdc.git/blame - phpdc.spec
- tabs in preamble
[packages/phpdc.git] / phpdc.spec
CommitLineData
22d512bb
ER
1# TODO
2# - webapps
3%define _rc rc1
295d819e 4Summary: A Web frontend for the Direct Connect Text Client
42c31bd4 5Summary(pl.UTF-8): Interfejs WWW do Direct Connect Text Client
295d819e
PG
6Name: phpdc
7Version: 1.0
295d819e
PG
8Release: 0.%{_rc}.1
9License: GPL v2
10Group: Applications/Databases/Interfaces
d0fcee60 11Source0: http://dl.sourceforge.net/phpdc/%{name}-%{version}%{_rc}.tar.gz
823bb986 12# Source0-md5: 035a6a0dbedd55f724237aa0b9cebff9
ae9d189c 13Source1: %{name}.conf
6b05ea84 14Patch0: %{name}-config.patch
2243c78c 15# http://phpdc.sourceforge.net/release/phpdc-1.0rc1-hublist_bug.patch
16Patch1: %{name}-1.0rc1-hublist_bug.patch
295d819e
PG
17URL: http://phpdc.sourceforge.net/
18Requires: dctc
22d512bb
ER
19Requires: php(gd)
20Requires: php(sockets)
295d819e 21Requires: webserver
22d512bb 22Requires: webserver(php) >= 4.3.0
295d819e
PG
23BuildArch: noarch
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
504d7cd8 26%define _phpdcdir %{_datadir}/%{name}
ae9d189c 27%define _sysconfdir /etc/%{name}
295d819e
PG
28
29%description
30PHPDC Web is a server-side Web frontend for the Direct Connect Text
31Client (dctc).
32
b9cb4adc
JR
33%description -l pl.UTF-8
34PHPDC Web to działający po stronie serwera frontend WWW do tekstowego
dd9ba7c6
JB
35klienta Direct Connect (dctc - Direct Connect Text Client).
36
295d819e
PG
37%prep
38%setup -q -n %{name}
6b05ea84 39%patch0 -p1
2243c78c 40%patch1 -p0
295d819e
PG
41
42%install
43rm -rf $RPM_BUILD_ROOT
504d7cd8 44install -d $RPM_BUILD_ROOT%{_phpdcdir}/{layout,private,styles,Downloads} \
ae9d189c 45 $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
504d7cd8 46
47install *.php $RPM_BUILD_ROOT%{_phpdcdir}
48install *.{html,png,ini} $RPM_BUILD_ROOT%{_phpdcdir}
49install layout/* $RPM_BUILD_ROOT%{_phpdcdir}/layout
50install private/* $RPM_BUILD_ROOT%{_phpdcdir}/private
51install styles/* $RPM_BUILD_ROOT%{_phpdcdir}/styles
52
53install phpdc.ini $RPM_BUILD_ROOT%{_sysconfdir}
54ln -sf %{_sysconfdir}/phpdc.ini $RPM_BUILD_ROOT%{_phpdcdir}/phpdc.ini
295d819e 55
504d7cd8 56install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
295d819e
PG
57
58%clean
59rm -rf $RPM_BUILD_ROOT
60
504d7cd8 61%post
62if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
ae9d189c 63 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
504d7cd8 64elif [ -d /etc/httpd/httpd.conf ]; then
ae9d189c 65 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
504d7cd8 66fi
67if [ -f /var/lock/subsys/httpd ]; then
ae9d189c 68 /usr/sbin/apachectl restart 1>&2
504d7cd8 69fi
70
71%preun
72if [ "$1" = "0" ]; then
ae9d189c 73 umask 027
74 if [ -d /etc/httpd/httpd.conf ]; then
75 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
76 else
77 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
78 /etc/httpd/httpd.conf.tmp
79 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
80 if [ -f /var/lock/subsys/httpd ]; then
81 /usr/sbin/apachectl restart 1>&2
82 fi
83 fi
504d7cd8 84fi
85
295d819e
PG
86%files
87%defattr(644,root,root,755)
504d7cd8 88%dir %{_sysconfdir}
d0fcee60
ER
89%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
90%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/%{name}.conf
504d7cd8 91%dir %{_phpdcdir}
92%dir %{_phpdcdir}/layout
93%dir %{_phpdcdir}/private
94%dir %{_phpdcdir}/styles
95%attr(664,http,http) %dir %{_phpdcdir}/Downloads
96%{_phpdcdir}/*.html
97%{_phpdcdir}/*.php
98%{_phpdcdir}/*.png
99%{_phpdcdir}/layout/*
100%{_phpdcdir}/private/*.php
101%{_phpdcdir}/styles/*
d0fcee60 102%attr(664,root,http) %config(noreplace) %verify(not md5 mtime size) %{_phpdcdir}/private/phpdc.ini
This page took 0.746638 seconds and 4 git commands to generate.