[evolvis-commits] r11005: applied [#1234] Add SuSE support to . spec of gforge-plugins-cvstracker by Xavie?==?UTF-8?Q?r Rameau↵
mirabilos at evolvis.org
mirabilos at evolvis.org
Thu Feb 24 17:59:23 CET 2011
Author: mirabilos
Date: 2011-02-24 17:59:23 +0100 (Thu, 24 Feb 2011)
New Revision: 11005
Modified:
trunk/gforge_base/evolvisforge-5.1/gforge-plugin-cvstracker/gforge-plugin-cvstracker.spec
trunk/gforge_base/evolvisforge-5.1/gforge-plugin-cvstracker/include/Snoopy.class
Log:
applied [#1234] Add SuSE support to .spec of gforge-plugins-cvstracker by Xavier Rameau
Modified: trunk/gforge_base/evolvisforge-5.1/gforge-plugin-cvstracker/gforge-plugin-cvstracker.spec
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge-plugin-cvstracker/gforge-plugin-cvstracker.spec 2011-02-24 16:59:22 UTC (rev 11004)
+++ trunk/gforge_base/evolvisforge-5.1/gforge-plugin-cvstracker/gforge-plugin-cvstracker.spec 2011-02-24 16:59:23 UTC (rev 11005)
@@ -1,7 +1,4 @@
-%define plugin cvstracker
-%define pluginlibdir %{_libdir}/gforge/plugins/%{plugin}
-%define pluginconfdir /etc/gforge/plugins/%{plugin}
-
+%define plugin cvstracker
%{!?release:%define release 1}
Summary: CVS Tracker Plugin for GForge CDE
@@ -18,6 +15,33 @@
URL: http://www.gforge.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
+%define gfuser gforge
+%define gfgroup gforge
+
+%if "%{_vendor}" == "suse"
+ %define httpduser wwwrun
+ %define httpdgroup www
+%else
+ %define httpduser apache
+ %define httpdgroup apache
+%endif
+
+#Globals defines for gforge
+%define GFORGE_DIR %{_datadir}/gforge
+%define GFORGE_CONF_DIR %{_sysconfdir}/gforge
+%define GFORGE_LANG_DIR %{GFORGE_CONF_DIR}/languages-local
+%define GFORGE_SBIN_DIR %{_sbindir}
+%define GFORGE_LIB_DIR %{_libdir}/gforge/lib
+%define GFORGE_DB_DIR %{_libdir}/gforge/db
+%define GFORGE_BIN_DIR %{_libdir}/gforge/bin
+%define PLUGINS_LIB_DIR %{_libdir}/gforge/plugins
+%define PLUGINS_CONF_DIR %{GFORGE_CONF_DIR}/plugins
+%define CROND_DIR %{_sysconfdir}/cron.d
+
+#specific define for plugins
+%define PLUGIN_LIB_DIR %{PLUGINS_LIB_DIR}/%{plugin}
+%define PLUGIN_CONF_DIR %{PLUGINS_CONF_DIR}/%{plugin}
+
%description
GForge CDE is a web-based Collaborative Development Environment offering
easy access to CVS, mailing lists, bug tracking, message
@@ -36,45 +60,38 @@
# cleaning build environment
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
-# setting paths
-PLUGIN_LIB_DIR=$RPM_BUILD_ROOT%{pluginlibdir}
-CONF_DIR=$RPM_BUILD_ROOT/etc
-PLUGIN_CONF_DIR=$RPM_BUILD_ROOT/%{pluginconfdir}
-
# installing crontab
-install -m 755 -d ${CONF_DIR}/cron.d
-install -m 644 rpm-specific/cron.d/%{name} ${CONF_DIR}/cron.d/
+install -m 755 -d $RPM_BUILD_ROOT/%{CROND_DIR}/
+install -m 644 rpm-specific/cron.d/%{name} $RPM_BUILD_ROOT/%{CROND_DIR}/
-# copying all needed stuff to $PLUGIN_LIB_DIR
-install -m 755 -d $PLUGIN_LIB_DIR
+# copying all needed stuff to %{PLUGIN_LIB_DIR}
+install -m 755 -d $RPM_BUILD_ROOT/%{PLUGIN_LIB_DIR}
for dir in bin include lib rpm-specific www; do
- cp -rp $dir ${PLUGIN_LIB_DIR}/
+ cp -rp $dir $RPM_BUILD_ROOT/%{PLUGIN_LIB_DIR}/
done;
+chmod 755 $RPM_BUILD_ROOT/%{PLUGIN_LIB_DIR}/bin/db-*.pl
-chmod 755 ${PLUGIN_LIB_DIR}/bin/db-upgrade.pl
-chmod 755 ${PLUGIN_LIB_DIR}/bin/db-delete.pl
-
# installing configuration file
-install -m 755 -d ${PLUGIN_CONF_DIR}
-install -m 664 etc/plugins/%{plugin}/config.php $PLUGIN_CONF_DIR/
+install -m 755 -d $RPM_BUILD_ROOT/%{PLUGIN_CONF_DIR}
+install -m 664 etc/plugins/%{plugin}/config.php $RPM_BUILD_ROOT/%{PLUGIN_CONF_DIR}/
%pre
%post
if [ "$1" = "1" ] ; then
# register plugin in database
- %{_libdir}/gforge/bin/register-plugin %{plugin} "CVS Tracker" &> /dev/null
+ %{GFORGE_BIN_DIR}/register-plugin %{plugin} "CVS Tracker" &> /dev/null
- su -l gforge -c "%{_libdir}/gforge/plugins/%{plugin}/bin/db-upgrade.pl 2>&1" | grep -v ^NOTICE
+ su -l %{gfuser} -c "%{PLUGIN_LIB_DIR}/bin/db-upgrade.pl 2>&1" | grep -v ^NOTICE
else
# upgrade
- su -l gforge -c "%{_libdir}/gforge/plugins/%{plugin}/bin/db-upgrade.pl 2>&1" | grep -v ^NOTICE
+ su -l %{gfuser} -c "%{PLUGIN_LIB_DIR}/bin/db-upgrade.pl 2>&1" | grep -v ^NOTICE
fi
%postun
if [ "$1" = "0" ] ; then
# unregister plugin in database
- %{_libdir}/gforge/bin/unregister-plugin %{plugin}
+ %{GFORGE_BIN_DIR}/unregister-plugin %{plugin}
else
# upgrade
:
@@ -86,14 +103,16 @@
%files
%defattr(-, root, root)
%doc AUTHORS COPYING README
-%attr(0664, apache, gforge) %config(noreplace) %{pluginconfdir}/config.php
-%{pluginlibdir}/bin
-%{pluginlibdir}/include
-%{pluginlibdir}/lib
-%{pluginlibdir}/rpm-specific
-%{pluginlibdir}/www
-/etc/cron.d/%{name}
+%attr(0660, %{httpduser}, %{gfgroup}) %config(noreplace) %{PLUGIN_CONF_DIR}/config.php
+%{PLUGIN_LIB_DIR}/bin
+%{PLUGIN_LIB_DIR}/include
+%{PLUGIN_LIB_DIR}/lib
+%{PLUGIN_LIB_DIR}/rpm-specific
+%{PLUGIN_LIB_DIR}/www
+%{CROND_DIR}/%{name}
%changelog
+* Fri Apr 29 2005 Xavier Rameau <xrameau at gmail.com>
+- Added support for SuSE
* Sat Mar 05 2005 Guillaume Smet <guillaume-gforge at smet.org>
Initial RPM packaging
Modified: trunk/gforge_base/evolvisforge-5.1/gforge-plugin-cvstracker/include/Snoopy.class
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge-plugin-cvstracker/include/Snoopy.class 2011-02-24 16:59:22 UTC (rev 11004)
+++ trunk/gforge_base/evolvisforge-5.1/gforge-plugin-cvstracker/include/Snoopy.class 2011-02-24 16:59:23 UTC (rev 11005)
@@ -81,7 +81,7 @@
var $timed_out = false; // if a read operation timed out
var $status = 0; // http request status
- var $curl_path = "/usr/local/bin/curl";
+ var $curl_path = "/usr/bin/curl";
// Snoopy will use cURL for fetching
// SSL content if a full system path to
// the cURL binary is supplied here.
More information about the evolvis-commits
mailing list