File enano.spec of Package enano
Summary: A PHP-based content management system
URL: http://www.enanocms.org
Name: enano
Version: 1.1.7
Group: Applications/Publishing
Release: 7%{?dist}
License: GPLv2+
Source0: %{name}-%{version}.tar.gz
Source1: enano-httpd-conf
Source2: README.distro.enano
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{_vendor} == "redhat"
Requires: php >= 5.2.0, httpd, ImageMagick
Requires: php-mcrypt, php-gd, php-cli
Requires: php-mysql, php-pgsql
%endif
%if %{_vendor} == "suse"
Requires: php >= 5.2.0, httpd, ImageMagick
Requires: php-mcrypt, php-gd, php-cli
Requires: php-mysql, php-pgsql
%endif
%if %{_vendor} == "mandriva"
Requires: php >= 5.2.0, apache, imagemagick
Requires: php-mcrypt, php-gd, php-cli
Requires: php-mysql, php-pgsql
%endif
%if %{_vendor} == "debbuild"
Requires: php5 >= 5.2.0, apache2, imagemagick
Requires: php5-mcrypt, php5-gd, php5-gmp, php5-cli
Requires: php5-mysql || php5-pgsql
%endif
BuildArch: noarch
%description
A content management system that strives to have
"less bloat and more float" than other solutions.
It includes powerful administrative capabilities and a
variety of plugins to add portals, forums, blogs, and
other functionality.
%prep
%setup -q -n %{name}
%build
# Nothing here, since it is PHP webapp
# so, nothing has to be compiled
%install
mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
install -m 0644 -D -p %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
mv config.new.php %{buildroot}%{_sysconfdir}/%{name}/config.php
mv web.config %{buildroot}%{_sysconfdir}/%{name}/web.config
cp -pr * %{buildroot}%{_datadir}/%{name}
cp -pr .htaccess.new %{buildroot}%{_datadir}/%{name}
ln -sf ../../../etc/enano/config.php %{buildroot}%{_datadir}/%{name}/config.new.php
ln -sf ../../../etc/enano/web.config %{buildroot}%{_datadir}/%{name}/web.config
cp %{SOURCE2} ./README.distro
# Remove empty files to make rpmlint happy
find %{buildroot} -empty -exec rm -f {} \;
# Remove static .htaccess files to make rpmlint happy
find %{buildroot} -name .htaccess -exec rm -f {} \;
# ------------------------------------------------------------
# --------------------TEMPORARY CHANGES-----------------------
# Make render-smilies.sh executable until upstream
# releases updated version with this fixed
find %{buildroot} -name render-smilies.sh -exec chmod +x {} \;
# ------------------------------------------------------------
# These are docs, remove them from here, docify them later
rm -f %{buildroot}%{_datadir}/%{name}/GPL
rm -f %{buildroot}%{_datadir}/%{name}/README
rm -f %{buildroot}%{_datadir}/%{name}/KNOWN_BUGS
ln -s %{_datadir}/doc/%{name}-%{version}/README %{buildroot}%{_datadir}/%{name}/README
ln -s %{_datadir}/doc/%{name}-%{version}/GPL %{buildroot}%{_datadir}/%{name}/GPL
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/cache
%{_datadir}/%{name}/files
%{_datadir}/%{name}/images
%{_datadir}/%{name}/includes
%{_datadir}/%{name}/install
%{_datadir}/%{name}/language
%{_datadir}/%{name}/licenses
%{_datadir}/%{name}/plugins
%{_datadir}/%{name}/themes
%{_datadir}/%{name}/index.php
%doc GPL
%doc README
%doc KNOWN_BUGS
%doc README.distro
# Added .htaccess.new for installer that autogenerates .htaccess
%{_datadir}/%{name}/.htaccess.new
%{_datadir}/%{name}/ajax.php
# Added config.new.php for installer that autogenerates config.php
%{_datadir}/%{name}/config.new.php
# Added in web.config for usage with server setups that read it
%{_datadir}/%{name}/web.config
%{_datadir}/%{name}/cron.php
%{_datadir}/%{name}/README
%{_datadir}/%{name}/GPL
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/config.php
%config(noreplace) %{_sysconfdir}/%{name}/web.config
%changelog
* Thu Sep 17 2015 Neal Gompa <neal{%}enanocms{*}org> - 1.1.7-7
- Replace RPM_BUILD_ROOT with buildroot macro
* Sat Dec 19 2009 Neal Gompa <neal{%}enanocms{*}org> - 1.1.7-6
- Bump up to 1.1.7 release
- Replaced some literals with variables
- Added in package dep checks for different distros
* Mon May 25 2009 Neal Gompa <neal{%}enanocms{*}org> - 1.1.6-5
- Updated to enano 1.1.6 final release
- Marked render-smilies.sh executable
- Added dummy build section to satisfy rpmlint
* Sun Apr 26 2009 Neal Gompa <neal{%}enanocms{*}org> - 1.1.6-4
- Fixed license field to GPLv2+
- Migrated static .htaccess file data to enano.conf
- Marked convert.sh executable
- Updated enano hg revision to 4babf8545826 (20090415)
* Thu Mar 05 2009 Neal Gompa <neal{%}enanocms{*}org> - 1.1.6-3
- Added php-{gd,mcrypt} as Requires in another line
- Added ImageMagick as Requires
- Moved php-mysql to third Requires line
- Added php-pgsql to Requires
* Wed Mar 04 2009 Neal Gompa <neal{%}enanocms{*}org> - 1.1.6-2
- Updated enano hg revision to e1ce6a91469b (20090301)
* Sat Jan 17 2009 Neal Gompa <neal{%}enanocms{*}org> - 1.1.6-1
- Created initial package for Enano CMS
- Based on wordpress SRPM