]> git.pld-linux.org Git - packages/PHP-nuke.git/blobdiff - PHP-nuke.spec
- updated to 7.7
[packages/PHP-nuke.git] / PHP-nuke.spec
index 72b268c3c7f364dc4d033f6b4217d92543eb041b..1e2994123b54e3227c3fbab836ebdb85e583186c 100644 (file)
@@ -1,39 +1,49 @@
-%define nukeroot /var/www/html/nuke
-
-Summary:       Slashdot-like webnews site written in php. Easy to install and use
+Summary:       Slashdot-like webnews site written in php, easy to install and use
+Summary(pl):   Serwis nowinek WWW w stylu Slashdota napisany w PHP, ³atwy w instalacji i u¿ywaniu
 Name:          PHP-nuke
-Version:       6.0
-Release:       1mdk
-Source0:       http://belnet.dl.sourceforge.net/sourceforge/phpnuke/PHP-Nuke-%version.tar.bz2
-Source1:       PHP-Nuke-README.first.bz2
+Version:       7.7
+Release:       1
 License:       GPL
-Url:           http://phpnuke.org
-Icon:          phpnuke.gif
-Group:         System/Servers
-Requires:      webserver mysqlserver php-common mod_php php-mysql
-BuildRoot:     %_tmppath/%name-%{version}-buildroot
+Group:         Applications/Databases/Interfaces
+Source0:       http://phpnuke.org/files/PHP-Nuke-%{version}.zip
+# Source0-md5: 27a14521dc5aaa0ebaefe78dd78449f9
+Source1:       PHP-Nuke.README.first
+Source2:       %{name}.conf
+#Icon:         phpnuke.gif
+URL:           http://phpnuke.org/
+Requires:      php-mysql
+Requires:      php-pcre
+Requires:      webserver
 BuildArch:     noarch
-Prefix:                %{nukeroot}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                _nukeroot       %{_datadir}/phpnuke
 
 %description
-Web-portal writen in php. 
-Very powerful, yet easy to install and use: see documentation in 
-%{_docdir}/%{name}-%{version} for details. 
+Web-portal writen in php. Very powerful, yet easy to install and use:
+see documentation in %{_docdir}/%{name}-%{version} for details.
 
-You only have to run :
-       mysqladmin create nuke
-       mysql nuke < %{_docdir}/%{name}-%{version}/nuke.sql
-       
-[read %{_docdir}/%{name}-%{version}/README.first
- for further information .-)]
+You only have to run:
+mysqladmin create nuke
+mysql nuke < %{_docdir}/%{name}-%{version}/nuke.sql
 
-%prep
+(read %{_docdir}/%{name}-%{version}/README.first for further
+information)
+
+%description -l pl
+Portal WWW napisany w PHP. Ma du¿e mo¿liwo¶ci, jest ³atwy w instalacji
+u u¿ywaniu. Szczegó³y w dokumentacji w %{_docdir}/%{name}-%{version}.
+
+Wystarczy zrobiæ jedno:
+mysqladmin create nuke
+mysql nuke < %{_docdir}/%{name}-%{version}/nuke.sql
+
+(wiêcej informacji w %{_docdir}/%{name}-%{version}/README.first)
 
-# Create Build Subdirectory and Unpack the Tar Ball
-%setup -q -c %{name}-%{version}
+%prep
+%setup -q -c
 
-cp %{SOURCE1} %{_builddir}/%{name}-%{version}/README.first.bz2
-bunzip2 %{_builddir}/%{name}-%{version}/*.bz2
+install %{SOURCE1} README.first
 
 # (TV): workaround for bad tarball
 find -type d -exec chmod 755 '{}' \;
@@ -41,84 +51,56 @@ find -type f -exec chmod 644 '{}' \;
 find -type f -empty |xargs rm -f
 chmod 755 */*/*/
 
-%build
-
 %install
-[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_nukeroot},/etc/httpd}
 
-# Make the Necessary Directories
-install -m755 -d %{buildroot}%{nukeroot}
-install -m755 -d %{buildroot}%{_docdir}/%{name}-%{version}
+cp -ar html/* $RPM_BUILD_ROOT%{_nukeroot}
 
-cp -ar html/* %{buildroot}/%{nukeroot}/
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/httpd/phpnuke.conf
 
 %clean
-[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
+rm -rf $RPM_BUILD_ROOT
+
+%triggerpostun -- %{name} <= 7.4-2
+if [ -s /home/services/httpd/html/nuke/config.php ]; then
+       mv -f /home/services/httpd/html/nuke/config.php %{_nukeroot}
+fi
+
+%post
+if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*phpnuke.conf" /etc/httpd/httpd.conf; then
+       echo "Include /etc/httpd/phpnuke.conf" >> /etc/httpd/httpd.conf
+       if [ -f /var/lock/subsys/httpd ]; then
+               /usr/sbin/apachectl restart 1>&2
+       fi
+elif [ -d /etc/httpd/httpd.conf ]; then
+       ln -sf /etc/httpd/phpnuke.conf /etc/httpd/httpd.conf/phpnuke.conf
+       if [ -f /var/lock/subsys/httpd ]; then
+               /usr/sbin/apachectl restart 1>&2
+       fi
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+       umask 027
+       if [ -d /etc/httpd/httpd.conf ]; then
+               rm -f /etc/httpd/httpd.conf/99_phpnuke.conf
+       else
+               grep -v "^Include.*phpnuke.conf" /etc/httpd/httpd.conf > \
+                       /etc/httpd/httpd.conf.tmp
+               mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
+       fi
+       if [ -f /var/lock/subsys/httpd ]; then
+               /usr/sbin/apachectl restart 1>&2
+       fi
+fi
 
 %files
-%defattr(-, root, root)
-%doc ADDONS-MODULES BLOCKS CHANGES CREDITS INSTALL README*
-%doc SUPPORT TODO TRANSLATIONS UPGRADE sql/nuke.sql upgrades
-%config(noreplace) %attr(644,apache,apache) %{nukeroot}/config.php
-%{nukeroot}
-
-%changelog
-* Mon Sep 23 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 6.0-1mdk
-- new version
-- new relocatable Prefix: %%{nukeroot} (defaults to /var/www/html/nuke)
-* Wed Sep 18 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 5.6-5mdk
-- do not require non existant php extensions
-
-* Thu Aug 22 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 5.6-4mdk
-- never output text in %%post
-
-* Tue Aug  6 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 5.6-3mdk
-- remove useradd/delete in %%pre %%postun
-- added some instructions in %%post
-
-* Mon Jul 22 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 5.6-2mdk
-- build release
-
-* Fri Jun  7 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 5.6-1mdk
-- new version
-- misc spec file fixes
-
-* Wed May 22 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 5.5-1mdk
-- new release
-
-* Thu Nov 22 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 5.3-2mdk
-- rpmlint fixes
-
-* Thu Nov 08 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 5.3-1mdk
-- new release
-
-* Fri Oct 05 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 5.2-2mdk
-- explain how to create the nuke db
-
-* Wed Oct 03 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 5.2-1mdk
-- new release
-
-* Thu Aug 16 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 5.1-1mdk
-- new release
-
-* Mon Aug 06 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 5.0.1-1mdk
-- don't overwirte config file
-- let apache alter it
-- clean spec file
-- readd url int source0
-- explain the only remaining step to do in description (one-liner)
-
-* Thu Jul 19 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 5.0.1-1mdk
-- new release
-- spec cleaning (empty {%%post,%%preun}, s,Copyright!License, ...)
-- fix '%%changelog not in decending chronological order' from denis
-
-* Tue  Jan  26 2001 Denis Havlik <deno@mandrakesoft.com> 4.3-1mdk
-- update to version 4.3, add php-mysql and mod-php to 'requires' 
-
-* Thu  Jan 11 2001 Denis Havlik <deno@mandrakesoft.com> 3.6-1mdk
-- version 3.6, rebuild for php4 
-
-* Sat Sep  2 2000 Denis Havlik <deno@mandrakesoft.com> 3.0-1mdk
-- first RPM of PHP-nuke-3.0
+%defattr(644,root,root,755)
+%doc Addons* Blocks* Changes* Credits* Install* README* Readme*
+%doc Support* Upgrade* sql/nuke.sql upgrades
+%config(noreplace) %verify(not size mtime md5) /etc/httpd/phpnuke.conf
+%dir %{_nukeroot}
+%config(noreplace) %attr(640,http,http) %{_nukeroot}/config.php
+%{_nukeroot}/[!c]*
+# more needed?
This page took 0.10157 seconds and 4 git commands to generate.