Last active
August 29, 2015 13:57
-
-
Save javierwilson/9789797 to your computer and use it in GitHub Desktop.
spec file for piwik
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%define contentdir /var/www | |
Name: piwik | |
Version: 2.1.0 | |
Release: 1%{?dist} | |
Summary: Open Analytics Platform | |
License: GPLv3 | |
URL: http://piwik.org/ | |
Source0: http://builds.piwik.org/latest.zip | |
Source1: piwik.conf | |
BuildArch: noarch | |
Requires: nginx, php, php-fpm, php-xml, php-gd, php-mbstring, php-mysqlnd, php-pdo | |
%description | |
Piwik is an open analytics platform currently used by individuals, companies and governments all over the world. With Piwik, your data will always be yours. Learn why Piwik is the right web analytics tool for you below. | |
%prep | |
%autosetup -n %{name} | |
%build | |
mkdir doc/ | |
mv LEGALNOTICE doc/ | |
mv README.md doc/ | |
%install | |
rm -rf $RPM_BUILD_ROOT | |
mkdir -p -m0755 $RPM_BUILD_ROOT%{contentdir}/%{name} | |
mkdir -p -m0755 $RPM_BUILD_ROOT%{contentdir}/%{name}/logs | |
mkdir -p -m0755 $RPM_BUILD_ROOT%{contentdir}/%{name}/public_html | |
mkdir -p -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/nginx/conf.d/ | |
# install config | |
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/nginx/conf.d/ | |
# install root files | |
install -m 644 composer.json $RPM_BUILD_ROOT%{contentdir}/%{name}/public_html/composer.json | |
install -m 644 composer.lock $RPM_BUILD_ROOT%{contentdir}/%{name}/public_html/composer.lock | |
install -m 644 index.php $RPM_BUILD_ROOT%{contentdir}/%{name}/public_html/index.php | |
install -m 644 piwik.js $RPM_BUILD_ROOT%{contentdir}/%{name}/public_html/piwik.js | |
install -m 644 piwik.php $RPM_BUILD_ROOT%{contentdir}/%{name}/public_html/piwik.php | |
# copy the rest | |
for d in config core js lang libs misc plugins tests tmp vendor; do | |
cp -rp $d $RPM_BUILD_ROOT%{contentdir}/%{name}/public_html/ | |
done | |
%files | |
%config(noreplace) %{_sysconfdir}/nginx/conf.d/*.conf | |
%doc doc/* | |
%{contentdir}/%{name}/public_html/ | |
%attr(0700, nginx, nginx) %dir %{contentdir}/%{name}/logs | |
%attr(0700, nginx, nginx) %dir %{contentdir}/%{name}/public_html/tmp | |
%changelog | |
* Wed Mar 26 2014 Javier Wilson <[email protected]> 2.1.0-1 | |
- first try |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment