+%post
+if [ "$1" = 1 ]; then
+%banner -e %{name} <<EOF
+If this is your first PHP Nuke install, then You should create the
+MySQL database:
+mysqladmin create nuke
+zcat %{_docdir}/%{name}-%{version}/nuke.sql | mysql nuke
+
+Read %{_docdir}/%{name}-%{version}/README.first.gz for further
+information.
+EOF
+fi
+
+%triggerin -- apache1
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1
+%webapp_unregister apache %{_webapp}
+
+%triggerin -- apache >= 2.0.0
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache >= 2.0.0
+%webapp_unregister httpd %{_webapp}
+
+%triggerpostun -- %{name} < 7.8-1.4
+# old 7.4-2 trigger
+if [ -s /home/services/httpd/html/nuke/config.php ]; then
+ mv -f /home/services/httpd/html/nuke/config.php %{_appdir}
+fi
+
+# nuke very-old config location (this mostly for Ra)
+if [ -f /etc/httpd/httpd.conf ]; then
+ sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
+fi
+
+# migrate from httpd (apache2) config dir
+if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
+ cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
+ mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf
+fi
+
+rm -f /etc/httpd/httpd.conf/phpnuke.conf
+/usr/sbin/webapp register httpd %{_webapp}
+%service -q httpd reload
+