]> git.pld-linux.org Git - packages/wordpress.git/blob - wordpress.spec
- TODO security
[packages/wordpress.git] / wordpress.spec
1 # TODO
2 # - security http://security.gentoo.org/glsa/glsa-200506-04.xml
3 # - security http://security.gentoo.org/glsa/glsa-200507-02.xml
4 Summary:        Personal publishing system
5 Summary(pl):    Osobisty system publikacji
6 Name:           wordpress
7 Version:        1.5
8 Release:        3
9 License:        GPL
10 Group:          Applications/Publishing
11 Source0:        http://wordpress.org/latest.tar.gz
12 # Source0-md5:  df6dc18a7a0d93fa6bb187eb48b41612
13 Source1:        wp-secure.sh
14 Source2:        wp-setup.sh
15 Source3:        wp-setup.txt
16 Source4:        %{name}.conf
17 URL:            http://wordpress.org/
18 Requires:       php >= 4.1
19 Requires:       php-gettext >= 5.0
20 Requires:       php-mysql >= 5.0
21 Requires:       php-pcre >= 5.0
22 Requires:       php-xml >= 5.0
23 Requires:       php-xmlrpc >= 5.0
24 Requires:       httpd
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define wordpressdir    %{_datadir}/%{name}
29
30 %description
31 WordPress is a state-of-the-art semantic personal publishing platform
32 with a focus on aesthetics, web standards, and usability. WordPress
33 was born out of a desire for an elegant, well-architectured personal
34 publishing system (also called blog or weblog) built on PHP and MySQL
35 and licensed under the GPL. It is the official successor of
36 b2/cafelog. WordPress is fresh software, but its roots and development
37 go back to 2001.
38
39 %description -l pl
40 WordPress jest technologicznie dopracowan±, semantyczn±, osobist±
41 platform± do publikacji k³ad±c± nacisk na standardy WWW oraz
42 u¿yteczno¶æ. WordPress zosta³ stworzony w wyniku potrzeby
43 eleganckiego, dobrze zaprojektowanego, osobistego systemu publikacji
44 (nazywanego równie¿ blogiem czy weblogiem). Jest to system oparty
45 o PHP i MySQL oraz na licencji GPL. Jest oficjalnym nastêpc± b2/cafelog.
46 WordPress jest nowym oprogramowaniem, ale jego korzenie i rozwój
47 siêgaj± 2001 roku.
48
49 %prep
50 %setup -q -n %{name}
51 cp %{SOURCE1} %{SOURCE2} %{SOURCE3} .
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT%{wordpressdir} $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT/etc/httpd
56
57 rm -f license.txt
58 install %{SOURCE4} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
59
60 cp -R * $RPM_BUILD_ROOT%{wordpressdir}
61 rm -f $RPM_BUILD_ROOT%{wordpressdir}/readme.html
62 rm -f $RPM_BUILD_ROOT%{wordpressdir}/wp-setup.txt
63 ln -sf %{wordpressdir}/wp-setup.sh $RPM_BUILD_ROOT%{_bindir}/wp-setup
64 ln -sf %{wordpressdir}/wp-secure.sh $RPM_BUILD_ROOT%{_bindir}/wp-secure
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %post
70 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
71         echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
72 elif [ -d /etc/httpd/httpd.conf ]; then
73         ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
74 fi
75 if [ -f /var/lock/subsys/httpd ]; then
76         /usr/sbin/apachectl restart 1>&2
77 fi
78 if [ ! -f %{wordpressdir}/wp-config.php ]; then
79         touch %{wordpressdir}/wp-config.php
80         chmod 0640 %{wordpressdir}/wp-config.php
81         chown root:http %{wordpressdir}/wp-config.php
82         cat %{wordpressdir}/wp-config-sample.php > %{wordpressdir}/wp-config.php
83         echo "To finish your configuration DO NOT FORGET to:"
84         echo
85         echo "0.) Create some MySQL database owned by some user"
86         echo "1.) Edit the file: %{wordpressdir}/wp-config.php"
87         echo "2.) Run a browser and visit: http://`hostname`/wordpress/wp-admin/install.php"
88 fi
89
90 %preun
91 if [ "$1" = "0" ]; then
92         umask 027
93         if [ -d /etc/httpd/httpd.conf ]; then
94                 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
95         else
96                 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
97                         /etc/httpd/httpd.conf.tmp
98                 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
99                 if [ -f /var/lock/subsys/httpd ]; then
100                         /usr/sbin/apachectl restart 1>&2
101                 fi
102         fi
103 fi
104
105 %files
106 %defattr(644,root,root,755)
107 %doc readme.html wp-setup.txt
108 %config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf
109 %dir %{wordpressdir}
110 %dir %attr(750,root,http) %{wordpressdir}/wp-content
111 %dir %attr(750,root,http) %{wordpressdir}/wp-content/plugins
112 %dir %attr(750,root,http) %{wordpressdir}/wp-content/themes
113 %dir %attr(750,root,http) %{wordpressdir}/wp-content/themes/classic
114 %dir %attr(750,root,http) %{wordpressdir}/wp-content/themes/default
115 %attr(640,root,http) %{wordpressdir}/wp-content/plugins/*.php
116 %attr(640,root,http) %{wordpressdir}/wp-content/themes/classic/*
117 %attr(640,root,http) %{wordpressdir}/wp-content/themes/default/*.php
118 %attr(640,root,http) %{wordpressdir}/wp-content/themes/default/*.css
119 %attr(640,root,http) %{wordpressdir}/wp-content/themes/default/images/*
120 %{wordpressdir}/wp-admin
121 %{wordpressdir}/wp-images
122 %{wordpressdir}/wp-includes
123 %{wordpressdir}/*.php
124 %{wordpressdir}/wp-secure.sh
125 %{wordpressdir}/wp-setup.sh
126 %attr(755,root,root) %{_bindir}/wp-secure
127 %attr(755,root,root) %{_bindir}/wp-setup
This page took 0.064211 seconds and 4 git commands to generate.