Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:plater
wordpress
wordpress.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File wordpress.spec of Package wordpress
# # spec file for package wordpress # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # apache macros %if 0%{?suse_version} %define apxs %{_sbindir}/apxs2 %define ap_libexecdir %(%{apxs} -q LIBEXECDIR) %define ap_sysconfdir %(%{apxs} -q SYSCONFDIR) %define ap_includedir %(%{apxs} -q INCLUDEDIR) %define ap_serverroot %(%{apxs} -q PREFIX) %else # Fedora, arrgghhh %define apxs %{_sbindir}/apxs %define ap_libexecdir %(%{apxs} -q LIBEXECDIR) %define ap_sysconfdir %(%{apxs} -q PREFIX) %define ap_includedir %(%{apxs} -q INCLUDEDIR) %define ap_serverroot /srv/www %endif %define ap_user wwwrun %define ap_group www %define wp_root %{ap_serverroot}/%{name} %define wp_config_root %{_sysconfdir}/%{name} %define language_date 20151205 %define language_date_formal 20151206 %define themes_date 20150126 %if 0%{?suse_version} >= 1210 %define has_systemd 1 %endif Name: wordpress Summary: World largest Bloging tool License: GPL-2.0 Group: Productivity/Networking/Web/Frontends Version: 4.8 Release: 0 Url: http://wordpress.org Source0: http://wordpress.org/%{name}-%{version}.tar.gz Source1: %{name}-lang-de_DE-%{language_date}.tar.gz Source2: %{name}-lang-de_DE_formal-%{language_date_formal}.tar.gz Source3: %{name}-plugins.tar.bz2 Source4: %{name}-themes-%{themes_date}.tar.gz Source10: README.SUSE Source11: %{name}.httpd Source12: %{name}.fpm Source20: %{name}.rpmlintrc # prepare wp-config for unique phrase Patch1: %{name}-sysconfdir.patch Patch2: %{name}-disable-core-auto-updates.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} BuildRequires: apache2-devel %else BuildRequires: httpd-devel %endif %if 0%{?suse_version} >= 1310 BuildRequires: php5-fpm %endif %if 0%{?suse_version} > 1100 BuildRequires: fdupes %endif %if 0%{?has_systemd} BuildRequires: systemd %{?systemd_requires} %else PreReq: %insserv_prereq %endif PreReq: shadow Requires: %{name}-themes = %{version}-%{release} Requires: mod_php_any Requires: php-dom Requires: php-mysql # php5-curl and php5-zlib are used to download themes Recommends: php-curl Recommends: php-zlib Recommends: wordpress-apache %description WordPress started in 2003 with a single bit of code to enhance the typography of everyday writing and with fewer users than you can count on your fingers and toes. Since then it has grown to be the largest self-hosted blogging tool in the world, used on hundreds of thousands of sites and seen by tens of millions of people every day. %package lang-de_DE Summary: German language files for wordpress Group: Productivity/Networking/Web/Frontends Requires: %{name} = %{version}-%{release} Conflicts: lang-de_DE_formal %description lang-de_DE This package includes german language files for wordpress %package lang-de_DE_formal Summary: German language files for wordpress Group: Productivity/Networking/Web/Frontends Requires: %{name} = %{version}-%{release} Conflicts: lang-de_DE %description lang-de_DE_formal This package includes german language files for wordpress %package plugins Summary: Plugins for wordpress Group: Productivity/Networking/Web/Frontends Requires: %{name} = %{version}-%{release} %description plugins This package includes plugins for wordpress: custom-post-widget 1.9.5 %package themes Summary: Original Themes for wordpress Group: Productivity/Networking/Web/Frontends Requires: %{name} = %{version}-%{release} %description themes This package includes original themes for wordpress %package themes-collections Summary: Some other Themes for wordpress Group: Productivity/Networking/Web/Frontends Requires: %{name} = %{version}-%{release} %description themes-collections This package includes some other themes for wordpress %package apache Summary: Configuration file for apache Group: Productivity/Networking/Web/Frontends Requires: %{name} = %{version}-%{release} %if 0%{?suse_version} Requires: apache2 Requires: mod_php_any %else # These are Redhat identifiers Requires: httpd Requires: mod_php_any %endif %description apache This package includes a vhost file for apache %if 0%{?suse_version} >= 1310 %package fpm Summary: Configuration file for php-fpm Group: Productivity/Networking/Web/Frontends Requires: %{name} = %{version}-%{release} Requires: php5-fpm %description fpm This package is useful for deployments with nginx and php-fpm as web app server. It provides a php-fpm pool config file, and creates a wordpress user, used to run the fpm subprocess. %endif %prep %setup -n %{name} -a 1 -a 2 -a 3 -a 4 # add README.SUSE %{__cp} -a %{S:10} . # create wp-config %patch1 -p1 %patch2 -p1 %{__cp} -a wp-config-sample.php wp-config.php ## rpmlint # wrong-file-end-of-line-encoding %{__perl} -p -i -e "s|\r\n|\n|" license.txt # wrong-script-end-of-line-encoding #%%{__perl} -p -i -e "s|\r\n|\n|" wp-content/themes/layers/* %{__perl} -p -i -e "s|\r\n|\n|" wp-config.php # script-without-shebang (has executable bits set) find ./ -type f -exec %{__chmod} 0644 {} \; # unneeded htaccess-file, it is in wordpress.httpd %{__rm} wp-content/plugins/akismet/.htaccess %build # no need for build %install %{__install} -d %{buildroot}%{wp_config_root} %{__install} -d %{buildroot}%{wp_root} %{__cp} -av * %{buildroot}%{wp_root}/ # install apache conf %{__install} -D -m0644 %{S:11} %{buildroot}%{ap_sysconfdir}/conf.d/%{name}.conf %{__sed} -i -e "s|@WP_ROOT@|%{wp_root}|" %{buildroot}%{ap_sysconfdir}/conf.d/%{name}.conf %if 0%{?suse_version} >= 1310 # install fpm conf %{__install} -D -m0644 %{S:12} %{buildroot}%{_sysconfdir}/php5/fpm/pool.d/%{name}.conf %endif # move wp-config to /etc/wordpress %{__mv} %{buildroot}%{wp_root}/wp-config.php %{buildroot}%{wp_config_root}/wp-config.php %{__sed} -i -e "s|@WP_CONFIG_ROOT@|%{wp_config_root}|g" \ %{buildroot}%{wp_root}/wp-admin/setup-config.php \ %{buildroot}%{wp_root}/wp-load.php # some cleanup %{__rm} %{buildroot}%{wp_root}/{license.txt,readme.html} ## rpmlint %if 0%{?suse_version} > 1100 # files duplicates %fdupes %{buildroot}%{wp_root} %endif # suse-filelist-forbidden %if 0%{?suse_version} <= 1320 %{__rm} %{buildroot}/%{wp_root}/wp-admin/setup-config.php.orig %{__rm} %{buildroot}/%{wp_root}/wp-load.php.orig %endif %post %{__chown} -R %{ap_user}:root %{wp_root} %{__chown} -R %{ap_user}:root %{wp_config_root} %post apache %if 0%{?has_systemd} %service_add_post apache2.service %else %restart_on_update apache2 %endif %postun apache %if 0%{?has_systemd} %service_del_postun apache2.service %else %restart_on_update apache2 %endif %if 0%{?suse_version} >= 1310 %pre fpm /usr/sbin/groupadd -r %{name} &>/dev/null || : /usr/sbin/useradd -g %{name} -s /bin/false -r -c "%{name}" -d %{wp_root} %{name} &>/dev/null || : %endif %clean %{__rm} -rf %{buildroot} %files %defattr(-,root,root) %doc license.txt readme.html README.SUSE %config(noreplace) %{wp_config_root}/wp-config.php %dir %attr(750,%{ap_user},root) %{wp_config_root} %{wp_root} # exclude language de_DE %exclude %{wp_root}/wp-content/languages/*de_DE* %exclude %{wp_root}/wp-content/languages/themes/*de_DE* %exclude %{wp_root}/wp-content/languages/plugins/*de_DE* # exlude plugins %exclude %{wp_root}/wp-content/plugins/* # exclude themes %exclude %{wp_root}/wp-content/themes/* # only wp-content for upgrade %defattr(-,%{ap_user},root) %{wp_root}/wp-content/ %files apache %defattr(-,root,root) %config(noreplace) %{ap_sysconfdir}/conf.d/%{name}.conf %if 0%{?suse_version} >= 1310 %files fpm %defattr(-,root,root) %dir %{_sysconfdir}/php5/fpm/pool.d %config(noreplace) %{_sysconfdir}/php5/fpm/pool.d/%{name}.conf %endif %files lang-de_DE %defattr(-,%{ap_user},root) %{wp_root}/wp-content/languages/*de_DE.* %{wp_root}/wp-content/languages/themes/*de_DE.* %{wp_root}/wp-content/languages/plugins/*de_DE.* %files lang-de_DE_formal %defattr(-,%{ap_user},root) %{wp_root}/wp-content/languages/*de_DE_formal.* %{wp_root}/wp-content/languages/themes/*de_DE_formal.* %{wp_root}/wp-content/languages/plugins/*de_DE_formal.* %files plugins %defattr(-,%{ap_user},root) %{wp_root}/wp-content/plugins/* %files themes %defattr(-,%{ap_user},root) %{wp_root}/wp-content/themes/index.php %{wp_root}/wp-content/themes/twentyfifteen %{wp_root}/wp-content/themes/twentysixteen %{wp_root}/wp-content/themes/twentyseventeen %files themes-collections %defattr(-,%{ap_user},root) %{wp_root}/wp-content/themes/ %exclude %{wp_root}/wp-content/themes/index.php %exclude %{wp_root}/wp-content/themes/twentyfifteen %exclude %{wp_root}/wp-content/themes/twentysixteen %exclude %{wp_root}/wp-content/themes/twentyseventeen %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor