%define serverdir %(apxs -q htdocsdir 2>/dev/null) # To create a customized installation of bbPress: # autospec -u bbpress -a5 \ # -d "installdir=%serverdir/../www.example.com, \ # sitename=example, \ # adminmail=webmaster@example.com" %if "%{?installdir}" == "" %define installdir %{serverdir}/bbpress %endif %if "%{?sitename}" != "" %if "%{?servername}" == "" %define servername %(basename %installdir 2>/dev/null) %endif %define serverlogdir %(apxs -q logfiledir 2>/dev/null) %else %if "%{?aliasdir}" == "" %define aliasdir /bbpress %endif %endif %define openmamba_theme_ver 1.1.2 %define i18n_version svn20110504 Name: %{?sitename:%sitename-website-}bbpress Version: 2.3.2 Release: 1mamba Summary: A forum software with a twist from the creators of WordPress Group: Applications/Web Vendor: openmamba Distribution: openmamba Packager: Stefano Cotta Ramusino URL: http://bbpress.org Source: http://downloads.wordpress.org/plugin/bbpress.%{version}.zip #Source: http://bbpress.org/latest.tar.gz?bbpress-%{version}.tar.gz Source1: bbpress-db-config # To get new version: # svn co http://svn.automattic.com/bbpress-i18n # find bbpress-i18n -name .svn -prune -exec rm -fr \{} \; # tar cjf bbpress-i8n-%{i18n_version}.tar.bz2 bbpress-i18n Source2: bbpress-i18n-%{i18n_version}.tar.bz2 Source20: bbpress-theme-openmamba-%{openmamba_theme_ver}.tar.bz2 Source21: http://bbpress.org/plugins/topic/avatar-upload/avatar-upload.0.8.3.zip Source22: http://bbpress.org/plugins/topic/allow-images/allow-images.0.9.zip Source23: http://bbpress.org/plugins/topic/bbpress-signatures/bbpress-signatures.zip Source24: http://bbpress.org/plugins/topic/bbpress-latest-discussion-for-wp/bbpress-latest-discussion-for-wp.0.9.zip Source25: http://bbpress.org/plugins/topic/simple-onlinelist/simple-onlinelist.1.5.zip Source26: http://bbpress.org/plugins/topic/private-messages/private-messages.0.80.zip Source27: http://bbpress.org/plugins/topic/bbpress-polls/bbpress-polls.zip Source28: http://bbpress.org/plugins/topic/topic-icons/topic-icons.zip Source29: http://bbpress.org/plugins/topic/bb-attachments/bb-attachments.zip Source30: http://bbpress.org/plugins/topic/ajaxed-chat/ajaxed-chat.1.0.zip Source31: http://bbpress.org/plugins/topic/post-notification/post-notification.zip Source32: http://bbpress.org/plugins/topic/bb-ratings/bb-ratings.0.8.5.zip Patch1: bbpress-1.0.2-config_d.patch Patch2: bbpress-1.0.2-i18n.patch Patch3: bbpress-1.0.2-theme_openmamba.patch Patch4: bbpress-1.0.2-i18n_fixemail.patch Patch5: bbpress-1.0.3-mass-delete-users.patch License: GPL Requires: apache-mod_php >= 4.2 Requires: php-mysql Requires: mysql >= 4.0 BuildRequires: gettext BuildRequires: unrar BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-root %description bbPress is focused on web standards, ease of use, ease of integration, and speed. The developers are focused on keeping things as small and light as possible while still allowing for great add on features through an extensive plugin system. bbPress is lean, mean and ready to take on any job you throw at it. %package theme-openmamba Summary: openmamba theme for bbPress Group: Applications/Web Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description theme-openmamba bbPress is focused on web standards, ease of use, ease of integration, and speed. The developers are focused on keeping things as small and light as possible while still allowing for great add on features through an extensive plugin system. bbPress is lean, mean and ready to take on any job you throw at it. This package contains openmamba theme. %prep %setup -q -n bbpress #%patch1 -p1 #sed -i -e "s,\(.*define.*BBDB.*\),//\1," bb-config-sample.php #%patch2 -p1 #mkdir -p my-languages #pushd my-languages #bzip2 -dc %{S:2} | tar -xf - #popd tar xjf %{S:20} #%patch3 -p1 #%patch4 -p1 find . -name '*~' -delete #%patch5 -p0 %build # FIXME: re-add languages :<< _EOF cd my-languages find bbpress-i18n/*/trunk -name "*.po" -exec mv -f \{} . \; msgfmt -o bg.mo bg*.po msgfmt -o da.mo da*.po msgfmt -o de.mo de*.po msgfmt -o es.mo es_ES*.po #msgfmt -o es_AR.mo es_AR.po #msgfmt -o et.mo et*.po msgfmt -o fr.mo fr*.po msgfmt -o he.mo he*.po msgfmt -o hu.mo hu*.po msgfmt -o id.mo id*.po msgfmt -o it.mo it*.po msgfmt -o ja.mo ja*.po #msgfmt -o pl.mo pl*.po msgfmt -o pt_BR.mo pt_BR.po msgfmt -o pt_PT.mo pt_PT.po msgfmt -o ru.mo ru*.po #msgfmt -o sk.mo sk.po msgfmt -o sr.mo sr*.po msgfmt -o sv.mo sv*.po #msgfmt -o ta.mo ta*.po #msgfmt -o th.mo th*.po #msgfmt -o tr.mo tr*.po msgfmt -o ug.mo ug*.po msgfmt -o uz.mo uz*.po msgfmt -o vi.mo vi*.po rm -fr bbpress-i18n rm -f *.po %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" install -d %{buildroot}%{installdir} cp -a * %{buildroot}%{installdir} #mv %{buildroot}%{installdir}/bb-config-sample.php \ # %{buildroot}%{installdir}/bb-config.php :<< __EOF # install plugins cd %{buildroot}%{installdir}/bb-plugins unzip %{SOURCE21} unzip %{SOURCE22} unzip %{SOURCE23} unzip %{SOURCE24} unzip %{SOURCE25} # private messages unzip %{SOURCE26} mv private-messages/* .. cp -a ../template\ folder/* ../bb-templates/kakumei/ cp -a ../template\ folder/* ../bb-templates/kakumei-blue/ mv ../template\ folder/* ../my-templates/openmamba/ rmdir ../template\ folder unzip %{SOURCE27} unzip %{SOURCE28} unzip %{SOURCE29} unzip %{SOURCE30} unzip %{SOURCE31} unzip %{SOURCE32} __EOF install -d %{buildroot}%{installdir}/config.d install -m 0644 %{S:1} %{buildroot}%{installdir}/config.d/db.php %if "%{?sitename}" != "" cat > %{buildroot}%{installdir}/config.d/general.php << EOF uri = 'http://%{servername}'; // What are you going to call me? \$bb->name = '%{sitename} forum'; // This must be set before you run the install script. \$bb->admin_email = '%{adminmail}'; ?> EOF %endif install -d %{buildroot}%{_sysconfdir}/httpd/httpd.d %if "%{?sitename}" != "" cat > %{buildroot}%{_sysconfdir}/httpd/httpd.d/%{servername}.conf << EOF %else cat > %{buildroot}%{_sysconfdir}/httpd/httpd.d/%{name}.conf << EOF %endif %if "%{?sitename}" == "" %if "%(dirname %installdir)" != "%{serverdir}" Alias %{aliasdir} %{installdir} %endif %endif AllowOverride Options Order allow,deny Allow from All %if "%{?sitename}" != "" %if "%(dirname %installdir)" != "%{serverdir}" %{?adminmail:ServerAdmin %adminmail} DocumentRoot %{installdir} ServerName %{servername} ErrorLog %{serverlogdir}/%{servername}-error_log CustomLog %{serverlogdir}/%{servername}-access_log common %endif %endif EOF %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post if [ $1 -ge 1 ]; then [ -e %{_localstatedir}/lock/subsys/httpd ] && service httpd reload || : fi : %preun if [ $1 -eq 0 ]; then #erase [ -e %{_localstatedir}/lock/subsys/httpd ] && service httpd reload || : fi : %files %defattr(-,root,root) %if "%{?sitename}" != "" %config(noreplace) %{_sysconfdir}/httpd/httpd.d/%{servername}.conf %else %config(noreplace) %{_sysconfdir}/httpd/httpd.d/%{name}.conf %endif %dir %{installdir} #%config(noreplace) %{installdir}/bb-config.php %config(noreplace) %{installdir}/config.d/db.php %if "%{?sitename}" != "" %config(noreplace) %{installdir}/config.d/general.php %endif %{installdir}/bbpress.php %{installdir}/humans.txt %{installdir}/index.php %{installdir}/license.txt %{installdir}/readme.txt %dir %{installdir}/languages %{installdir}/languages/* #%dir %{installdir}/bb-admin #%{installdir}/bb-admin/* %dir %{installdir}/includes %{installdir}/includes/* #%dir %{installdir}/bb-plugins #%{installdir}/bb-plugins/* %dir %{installdir}/templates %{installdir}/templates/* #%dir %{installdir}/my-plugins #%{installdir}/my-plugins/bb-privatemessage.php %files theme-openmamba %defattr(-,root,root) %config(noreplace) %{installdir}/config.d/theme-openmamba.php %dir %{installdir}/my-templates %{installdir}/my-templates/openmamba %changelog * Tue Jun 11 2013 Automatic Build System 2.3.2-1mamba - update to 2.3.2 * Fri Sep 21 2012 Silvan Calarco 1.0.3-5mamba - added a patch to add support for user mass deletion (http://bbpress.trac.wordpress.org/ticket/960) * Sun Oct 02 2011 Silvan Calarco 1.0.3-4mamba - bb-attachments: update to 0.29 * Sat May 07 2011 Silvan Calarco 1.0.3-3mamba - re-enabled plugins * Wed May 04 2011 Silvan Calarco 1.0.3-2mamba - updated languages and openmamba theme * Wed May 04 2011 Silvan Calarco 1.0.3-1mamba - update to 1.0.3 * Thu Jan 14 2010 Automatic Build System 1.0.2-1mamba - automatic update by autodist * Mon Jun 08 2009 Silvan Calarco 0.9.0.5-1mamba - update to 0.9.0.5 - added post notification plugin * Thu Aug 28 2008 Silvan Calarco 0.9.0.2-4mamba - added forum-is-category plugin * Fri Aug 01 2008 Silvan Calarco 0.9.0.2-3mamba - added patch to fix incorrect characters encoding in italian registration email * Tue Jun 10 2008 Silvan Calarco 0.9.0.2-2mamba - added plugins * Tue Jun 10 2008 Silvan Calarco 0.9.0.2-1mamba - update to 0.9.0.2 * Wed Sep 05 2007 Silvan Calarco 0.8.2.1-3mamba - updates to openmamba-theme for better integration with www.openmamba.org * Mon Jul 23 2007 Stefano Cotta Ramusino 0.8.2.1-2mamba - added %%installdir, %%sitename and %%adminmail variables - added i18n files - added config.d directory management for included configuration files - added theme-openmamba subpackage * Fri Jul 20 2007 Silvan Calarco 0.8.2.1-1mamba - update to 0.8.2.1 * Mon Apr 16 2007 Stefano Cotta Ramusino 0.8.1-1mamba - package created by autospec