app-admin/pulse2-core: initial checkin of the new pulse2 ebuild

(Portage version: 2.2.0_alpha19-r1/svn/Linux x86_64, RepoMan options: --force)

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/mds@2822 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2011-01-29 14:23:33 +00:00
parent 94e79d1761
commit cb32ebfdf8
6 changed files with 510 additions and 0 deletions

View File

@ -0,0 +1,11 @@
# ChangeLog for app-admin/pulse2-core
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
*pulse2-core-1.3.0 (29 Jan 2011)
29 Jan 2011; Mario Fetka <mario.fetka@gmail.com> +pulse2-core-1.3.0.ebuild,
+files/pulse2-1.3.0-makefile-1.patch, +files/pulse2-1.3.0-python_fix-1.patch,
+files/pulse2-imaging-server.initd:
initial checkin of the new pulse2 ebuild

View File

@ -0,0 +1,12 @@
AUX pulse2-1.3.0-makefile-1.patch 16028 RMD160 9a376a9700a7cbb9ab8836d125f54bc7d858357e SHA1 8b9a6b6f430e99b8882a522dc65c8b238b1b6b11 SHA256 6d8faa61a7ecc03e08e51880bdedc38258dcb722fbf538c93540ccbc302d69f8
AUX pulse2-1.3.0-python_fix-1.patch 735 RMD160 d3e5a3cac7d966f20757a511be50170aa14e4c0e SHA1 c8f575e49be9cb4855e176fe66c9e27975e66da2 SHA256 9766980195070fc54015681a4b30a346a11992c4e460e9c70f8603d3781816cc
AUX pulse2-imaging-server.initd 502 RMD160 1c9a3744afcc4b7239e8f5dc2a17f9c3757bf041 SHA1 e4615788b9635acdc2ad1071ae3457edda84ea07 SHA256 52f141c45b026edf8db3ef81bd2b6e43f151f179e0e516b4e15d914db08ccd24
AUX pulse2-inventory-server.initd 512 RMD160 5b606759f56264ae61d9bf151c815aa1c67c13db SHA1 2ca136a346b2cf68620ac663aac2d36ae86d2541 SHA256 dd52665b29cf60d100a8909455ecd7edb2d047c96e5654be343b8a4e97856c94
AUX pulse2-launchers.initd 499 RMD160 1f0437bf606ab8e2660b66df2b01abb3dc3c53f7 SHA1 c92c22ab26721d073b0fdb410a39c7d7784217ed SHA256 37e8b59a98a91663a33e1ef404ae1024aa2c96c3228452ea9ed3eb9481d70dd4
AUX pulse2-package-server.initd 502 RMD160 d59eabd0b308763f84c5c1122d3be51efa9b936b SHA1 8baca6587a44a0e5a703cbbdcb49d7047bbf830b SHA256 fdbeb24053631223c1634e85712d16b24d177a0309d2bacb28562ca02e7fe4e4
AUX pulse2-scheduler.initd 501 RMD160 c50840c22f9886463bf8228d539a6143dbc46296 SHA1 67e7ad16e9c1969a8fa561aebe9949778ccf1f73 SHA256 0cd1ba84b7339ec7eaa6b57ee52f13ac96f4934c8d7a408fe327a5e1cad5147f
DIST pulse2-1.3.0.tar.gz 12817762 RMD160 c909016d681aff9f0ec19b129619153ded321782 SHA1 a325a7f1913fa0bc7ec15dfd7e999c4f7050e51d SHA256 12c4b4e06aca4a20da3bcf8ce19399ff04723854798e16c368954a4ee961c5cf
DIST wol-0.7.1.tar.gz 445648 RMD160 856fefe482db4326df47f10f07ec97396f23870d SHA1 7edd1a8c2d4baffc3b6baf8fcd12e786f9fc1fbd SHA256 e0086c9b9811df2bdf763ec9016dfb1bcb7dba9fa6d7858725b0929069a12622
EBUILD pulse2-core-1.3.0.ebuild 2024 RMD160 93f5fee7465ca4d6d5069269017a787589da99c3 SHA1 3ae795649f2aaf72c296263e01a45cc4abc7d424 SHA256 a9a2f9eb1c7a66042b98e2d029fdbe1a338e23948835e1ece7e40ee87feca1fd
MISC ChangeLog 396 RMD160 bc08c5b086844945921bfcc293ce9a39b4c81175 SHA1 dc650382c489db2de170c4817c445cc26e6aadfc SHA256 9edf2d3ac0b6619d0044261c50ccc2a7fd7899a313c656c12214f6ee1e6d9cc9
MISC metadata.xml 226 RMD160 bebcbe7a5e3d2be83c25e006192f71ebf45abb14 SHA1 ec2b713fc2363b8c51e9c164d0802eeb59d9d296 SHA256 a9d3f7df2362a9a7ddcbe05c5d97d726eeb4bab135b21643508149a08bf6a2b2

View File

@ -0,0 +1,369 @@
diff -uNr pulse2-1.3.0.orig//services/Makefile pulse2-1.3.0/services/Makefile
--- pulse2-1.3.0.orig//services/Makefile 2011-01-29 09:09:53.000000000 +0100
+++ pulse2-1.3.0/services/Makefile 2011-01-29 12:37:18.000000000 +0100
@@ -1,38 +1,62 @@
+# (c) 2007-2008 Mandriva, http://www.mandriva.com
#
-# (c) 2009-2010 Mandriva, http://www.mandriva.com
-#
-# $Id: Makefile 7788 2010-12-02 12:31:34Z cdelfosse $
-#
-# This file is part of Pulse 2, http://pulse2.mandriva.org
-#
-# Pulse 2 is free software; you can redistribute it and/or modify
+# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
-# Pulse 2 is distributed in the hope that it will be useful,
+# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with Pulse 2. If not, see <http://www.gnu.org/licenses/>.
-#
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
# General Makefile variables
PULSE2_OWNER := root
PULSE2_GROUP := root
-PREFIX := /usr/local
+DESTDIR =
+PREFIX = /usr/local
VARDIR := /var/lib/pulse2/imaging
VARIMAGINGDIR := $(VARDIR)/imaging-server
HOOKSDIR := $(PREFIX)/lib/pulse2/imaging-server/hooks
-SBINDIR := $(PREFIX)/sbin
-INITDIR := /etc/init.d
-ETCDIR := /etc/mmc
-INSTALL := $(shell which install)
-SED := $(shell which sed)
+DATADIR = $(PREFIX)/share/mmc
+MODULESWEBSUBDIR = /modules/
+SBINDIR = $(PREFIX)/sbin
+LIBDIR = $(PREFIX)/lib/mmc
+ETCDIR = /etc/mmc
+INITDIR = /etc/init.d
3RDPARTY_FOLDER := 3rd_party
BUILD_FOLDER := build
+INSTALL = $(shell which install)
+SED = $(shell which sed)
+CP = $(shell which cp)
+CHOWN = $(shell which chown)
+CHGRP = $(shell which chgrp)
+
+# Python specific variables
+PYTHON = $(shell which python)
+PYTHON_PREFIX = $(shell $(PYTHON) -c "import sys; print sys.prefix")
+
+# List of files to install
+SBINFILES = bin/pulse2-package-server \
+ bin/pulse2-package-server-register-imaging \
+ contrib/msc/pulse2-msc-clean-database \
+ contrib/inventory/pulse2-inventory-clean-database \
+ bin/pulse2-inventory-server \
+ bin/pulse2-scheduler \
+ bin/pulse2-scheduler-manager \
+ bin/pulse2-launcher \
+ bin/pulse2-launchers-manager \
+ bin/pulse2-output-wrapper \
+ bin/pulse2-ping \
+ bin/pulse2-wol \
+ bin/pulse2-tcp-sproxy \
+ src/pulse2-imaging-server
# WOL stuff
WOL_VERSION := 0.7.1
@@ -40,15 +64,14 @@
WOL_FOLDER := wol-$(WOL_VERSION)
WOL_TARBALL := $(WOL_FOLDER).tar.gz
-# main target
+# Extension for backuped configuration files
+BACKUP := .$(shell date +%Y-%m-%d+%H:%M:%S)
BUILD_FOLDER = build
SUBDIRS = src
.PHONY: subdirs $(SUBDIRS)
-all: subdirs wol
-
subdirs: $(SUBDIRS)
$(SUBDIRS):
@@ -62,8 +85,6 @@
wol-clean:
-$(MAKE) clean -C $(BUILD_FOLDER)/$(WOL_FOLDER)
-install: subdirs install-imaging-server
-
wol:
[ -e $(3RDPARTY_FOLDER)/$(WOL_TARBALL) ] || wget $(WOL_URI)/$(WOL_TARBALL) -P $(3RDPARTY_FOLDER)
[ -d $(BUILD_FOLDER)/$(WOL_FOLDER) ] || tar zxf $(3RDPARTY_FOLDER)/$(WOL_TARBALL) -C $(BUILD_FOLDER)
@@ -71,9 +92,93 @@
$(MAKE) -C $(BUILD_FOLDER)/$(WOL_FOLDER) CC=$(CC)
cp -a $(BUILD_FOLDER)/$(WOL_FOLDER)/src/wol bin/pulse2-wol
-install-imaging-server:
+all: subdirs wol
+
+# Install everything
+install_nopy: subdirs install_backup install_sbin install_cfg install_initd install_hooks install_dirs
+install: install_nopy install_py
+
+install_backup:
+ @# Install directories
+ @echo ""
+ @echo "Move old configuration files to $(DESTDIR)$(ETCDIR)$(BACKUP)"
+ -[ -f $(DESTDIR)$(ETCDIR)/package-server.ini ] && mv -f $(DESTDIR)$(ETCDIR)/package-server.ini $(DESTDIR)$(ETCDIR)/package-server.ini$(BACKUP)
+ @echo "Move old configuration files to $(DESTDIR)$(ETCDIR)$(BACKUP)"
+ -[ -f $(DESTDIR)$(ETCDIR)/inventory-server.ini ] && mv -f $(DESTDIR)$(ETCDIR)/inventory-server.ini $(DESTDIR)$(ETCDIR)/inventory-server.ini$(BACKUP)
+ @echo "Move old configuration files to $(DESTDIR)$(ETCDIR)$(BACKUP)"
+ -[ -f $(DESTDIR)$(ETCDIR)/scheduler.ini ] && mv -f $(DESTDIR)$(ETCDIR)/scheduler.ini $(DESTDIR)$(ETCDIR)/scheduler.ini$(BACKUP)
+ @echo "Move old configuration files to $(DESTDIR)$(ETCDIR)$(BACKUP)"
+ -[ -f $(DESTDIR)$(ETCDIR)/launchers.ini ] && mv -f $(DESTDIR)$(ETCDIR)/launchers.ini $(DESTDIR)$(ETCDIR)/launchers.ini$(BACKUP)
+
+install_py:
+ @echo ""
+ @echo "Creating python directories..."
+ $(INSTALL) -d -m 755 -o root -g root $(DESTDIR)$(PYTHON_PREFIX)
+ @echo ""
+ @echo "Install python code in $(DESTDIR)$(PYTHON_PREFIX)"
+ $(PYTHON) setup.py install --no-compile --prefix $(DESTDIR)$(PYTHON_PREFIX)
+
+install_sbin: subdirs
+ @echo ""
+ @echo "Creating sbin directories..."
+ $(INSTALL) -d -m 755 -o root -g root $(DESTDIR)$(SBINDIR)
+ @echo ""
+ @echo "Install SBINFILES in $(DESTDIR)$(SBINDIR)"
+ $(INSTALL) $(SBINFILES) -m 755 -o root -g root $(DESTDIR)$(SBINDIR)
+
+install_cfg:
+ @echo ""
+ @echo "Creating config directories..."
+ $(INSTALL) -d -m 755 -o root -g root $(DESTDIR)$(ETCDIR)
+ @echo ""
+ @echo "Install CONFILES in $(DESTDIR)$(ETCDIR)"
+ $(INSTALL) -d -m 755 -o root -g root $(DESTDIR)$(ETCDIR)/plugins
+ $(INSTALL) conf/plugins/* -m 600 -o root -g root $(DESTDIR)$(ETCDIR)/plugins
+ $(INSTALL) -d -m 755 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/package-server
+ $(INSTALL) conf/pulse2/package-server/package-server.ini -m 600 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/package-server
+ $(INSTALL) conf/pulse2/package-server/keys -d -m 700 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/package-server/keys
+ $(INSTALL) conf/pulse2/package-server/keys/* -m 600 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/package-server/keys/
+ $(INSTALL) -d -m 755 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/inventory-server
+ $(INSTALL) conf/pulse2/inventory-server/inventory-server.ini -m 600 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/inventory-server
+ $(INSTALL) conf/pulse2/inventory-server/keys -d -m 700 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/inventory-server/keys
+ $(INSTALL) conf/pulse2/inventory-server/keys/* -m 600 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/inventory-server/keys/
+ $(INSTALL) contrib/OcsNGMap.xml -m 600 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/inventory-server/
+ $(INSTALL) -d -m 755 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/scheduler
+ $(INSTALL) conf/pulse2/scheduler/scheduler.ini -m 600 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/scheduler
+ $(INSTALL) conf/pulse2/scheduler/keys -d -m 700 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/scheduler/keys
+ $(INSTALL) conf/pulse2/scheduler/keys/* -m 600 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/scheduler/keys/
+ $(INSTALL) -d -m 755 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/launchers
+ $(INSTALL) conf/pulse2/launchers/launchers.ini -m 600 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/launchers
+ $(INSTALL) conf/pulse2/launchers/keys -d -m 700 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/launchers/keys
+ $(INSTALL) conf/pulse2/launchers/keys/* -m 600 -o root -g root $(DESTDIR)$(ETCDIR)/pulse2/launchers/keys/
+ $(INSTALL) -m 755 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) -d $(DESTDIR)/$(ETCDIR)/pulse2/imaging-server
+ $(INSTALL) -m 755 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) -d $(DESTDIR)/$(ETCDIR)/pulse2/atftpd
+ $(INSTALL) -m 600 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) conf/pulse2/imaging-server/imaging-server.ini $(DESTDIR)/$(ETCDIR)/pulse2/imaging-server
+ $(INSTALL) -m 600 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) conf/pulse2/atftpd/pcre.conf $(DESTDIR)/$(ETCDIR)/pulse2/atftpd
+
+install_initd:
+ @echo ""
+ @echo "Creating init.d directories..."
+ $(INSTALL) -d -m 755 -o root -g root $(DESTDIR)$(INITDIR)
+ $(INSTALL) -m 755 -o root -g root init.d/pulse2-package-server $(DESTDIR)$(INITDIR)
+ $(SED) -i 's!##SBINDIR##!$(SBINDIR)!' $(DESTDIR)$(INITDIR)/pulse2-package-server
+ $(INSTALL) -m 755 -o root -g root init.d/pulse2-inventory-server $(DESTDIR)$(INITDIR)
+ $(SED) -i 's!##SBINDIR##!$(SBINDIR)!' $(DESTDIR)$(INITDIR)/pulse2-inventory-server
+ $(INSTALL) -m 755 -o root -g root init.d/pulse2-scheduler $(DESTDIR)$(INITDIR)
+ $(SED) -i 's!##SBINDIR##!$(SBINDIR)!' $(DESTDIR)$(INITDIR)/pulse2-scheduler
+ $(INSTALL) -m 755 -o root -g root init.d/pulse2-launchers $(DESTDIR)$(INITDIR)
+ $(SED) -i 's!##SBINDIR##!$(SBINDIR)!' $(DESTDIR)$(INITDIR)/pulse2-launchers
+ $(INSTALL) -m 755 -o root -g root init.d/pulse2-imaging-server $(DESTDIR)$(INITDIR)
+ $(SED) -i 's!##SBINDIR##!$(SBINDIR)!' $(DESTDIR)$(INITDIR)/pulse2-imaging-server
+
+install_hooks:
+ @echo "Installing hooks ..."
+ $(INSTALL) -m 755 -o root -g root -d $(DESTDIR)/$(HOOKSDIR)
+ $(INSTALL) -m 755 -o root -g root contrib/imaging-server/hooks/* $(DESTDIR)/$(HOOKSDIR)/
+
+install_dirs:
@echo ""
- @echo "Creating directories ..."
+ @echo "Creating extra directories ..."
$(INSTALL) -m 750 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) -d $(DESTDIR)/$(VARDIR)
$(INSTALL) -m 750 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) -d $(DESTDIR)/$(VARDIR)/bootmenus
$(INSTALL) -m 750 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) -d $(DESTDIR)/$(VARDIR)/computers
@@ -83,19 +188,15 @@
$(INSTALL) -m 750 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) -d $(DESTDIR)/$(VARDIR)/isos
$(INSTALL) -m 750 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) -d $(DESTDIR)/$(VARDIR)/archives
- @echo "Installing binaries ..."
- $(INSTALL) -m 755 -o root -g root src/pulse2-imaging-server $(DESTDIR)/$(SBINDIR)/pulse2-imaging-server
+include ../common.mk
- @echo "Installing hooks ..."
- $(INSTALL) -m 755 -o root -g root -d $(DESTDIR)/$(HOOKSDIR)
- $(INSTALL) -m 755 -o root -g root contrib/imaging-server/hooks/* $(DESTDIR)/$(HOOKSDIR)/
+$(RELEASES_DIR)/$(TARBALL_GZ):
+ mkdir -p $(RELEASES_DIR)/$(TARBALL)
+ $(CPA) web services common.mk Makefile $(RELEASES_DIR)/$(TARBALL)
+ cd $(RELEASES_DIR) && tar -czf $(TARBALL_GZ) $(EXCLUDE_FILES) $(TARBALL); rm -rf $(TARBALL);
+
+
+pyflakes:
+ pyflakes bin/pulse2-scheduler* bin/pulse2-launcher* bin/pulse2-package* bin/pulse2-inventory* bin/pulse2-output-wrapper bin/build* .
- @echo "Installing init files ..."
- $(INSTALL) -m 755 -o root -g root init.d/pulse2-imaging-server $(DESTDIR)$(INITDIR)
- $(SED) -i 's!##SBINDIR##!$(SBINDIR)!g' $(DESTDIR)$(INITDIR)/pulse2-imaging-server
- @echo "Installing config files ..."
- $(INSTALL) -m 755 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) -d $(DESTDIR)/$(ETCDIR)/pulse2/imaging-server
- $(INSTALL) -m 755 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) -d $(DESTDIR)/$(ETCDIR)/pulse2/atftpd
- $(INSTALL) -m 600 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) conf/pulse2/imaging-server/imaging-server.ini $(DESTDIR)/$(ETCDIR)/pulse2/imaging-server
- $(INSTALL) -m 600 -o $(PULSE2_OWNER) -g $(PULSE2_GROUP) conf/pulse2/atftpd/pcre.conf $(DESTDIR)/$(ETCDIR)/pulse2/atftpd
diff -uNr pulse2-1.3.0.orig//services/src/pulse2-imaging-server.c pulse2-1.3.0/services/src/pulse2-imaging-server.c
--- pulse2-1.3.0.orig//services/src/pulse2-imaging-server.c 2011-01-29 09:09:53.000000000 +0100
+++ pulse2-1.3.0/services/src/pulse2-imaging-server.c 2011-01-29 12:32:38.000000000 +0100
@@ -400,7 +400,7 @@
*/
char *name = malloc(40);
bzero(name, 40);
- fo = open(filename, 'r');
+ fo = open(filename, 'r', S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
read(fo, name, 40);
close(fo);
sendto(s, name, strlen(name) + 1 , MSG_NOSIGNAL,
@@ -647,7 +647,7 @@
*/
char *name = malloc(256);
bzero(name, 256);
- fo = open(filename, 'r');
+ fo = open(filename, 'r', S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
read(fo, name, 256);
close(fo);
sendto(s, name, strlen(name) + 1 , MSG_NOSIGNAL,
@@ -707,7 +707,7 @@
*/
char *name = malloc(256);
bzero(name, 256);
- fo = open(filename, 'r');
+ fo = open(filename, 'r', S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
read(fo, name, 256);
close(fo);
sendto(s, name, strlen(name) + 1 , MSG_NOSIGNAL,
@@ -932,7 +932,7 @@
diep("bind TCP");
listen(stcp, 1000);
- pidFileFD = open((char *)gPIDFile, O_WRONLY | O_CREAT | O_TRUNC);
+ pidFileFD = open((char *)gPIDFile, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (pidFileFD == -1)
diep("PID file");
snprintf(pidBuff, 6, "%d", pid);
diff -uNr pulse2-1.3.0.orig//web/Makefile pulse2-1.3.0/web/Makefile
--- pulse2-1.3.0.orig//web/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ pulse2-1.3.0/web/Makefile 2011-01-29 09:25:31.000000000 +0100
@@ -0,0 +1,60 @@
+# Copyright (C) 2006, Adam Cecile for Linbox FAS
+# Copyright (C) 2006, Jerome Wax for Linbox FAS
+# Copyright (C) 2006, Cedric Delfosse for Linbox FAS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+
+# General Makefile variables
+DESTDIR =
+PREFIX = /usr/local
+DATADIR = $(PREFIX)/share/mmc
+INSTALL = $(shell which install)
+CP = $(shell which cp)
+CHOWN = $(shell which chown)
+CHGRP = $(shell which chgrp)
+SED = $(shell which sed)
+RM = $(shell which rm)
+
+FILESTOINSTALL = modules
+
+# Default target
+all:
+
+clean_mo:
+ sh scripts/clean_mo.sh
+
+build_mo:
+ sh scripts/build_mo.sh
+
+build_pot:
+ sh scripts/build_pot.sh
+
+clean: clean_mo
+
+install: build_mo
+ @echo ""
+ @echo "Installing pulse2-web in $(DESTDIR)$(DATADIR)"
+ $(INSTALL) -d -m 755 -o root -g root $(DESTDIR)$(DATADIR)
+ $(CP) -R $(FILESTOINSTALL) $(DESTDIR)$(DATADIR)
+ $(CHOWN) -R root $(DESTDIR)$(DATADIR)
+ $(CHGRP) -R root $(DESTDIR)$(DATADIR)
+ find $(DESTDIR)$(DATADIR) -type f -name *.po[t] -exec rm -f {} \;
+
+$(RELEASES_DIR)/$(TARBALL_GZ):
+ mkdir -p $(RELEASES_DIR)/$(TARBALL)
+ $(CPA) $(FILESTOINSTALL) $(RELEASES_DIR)/$(TARBALL)
+ cd $(RELEASES_DIR) && tar -czf $(TARBALL_GZ) $(EXCLUDE_FILES) $(TARBALL); rm -rf $(TARBALL);
diff -uNr pulse2-1.3.0.orig//web/scripts/build_pot.sh pulse2-1.3.0/web/scripts/build_pot.sh
--- pulse2-1.3.0.orig//web/scripts/build_pot.sh 2011-01-29 09:09:53.000000000 +0100
+++ pulse2-1.3.0/web/scripts/build_pot.sh 2011-01-29 09:46:25.000000000 +0100
@@ -16,17 +16,17 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-POT="pulse2/locale/pulse2.pot"
-
-rm ${POT}
-touch ${POT}
-find . -iname "*.php" -exec xgettext -C -j -o ${POT} --language=PHP --keyword=_T {} \;
-
-for name in `find ${1} -type f -name *.po`; do
- echo -n "updating ${name}..."
- msgmerge --update --add-location --sort-output ${name} ${POT}
- echo "done"
+for module in dyngroup glpi imaging inventory msc pkgs pulse2; do
+ POT="modules/$module/locale/$module.pot"
+ rm -f ${POT}
+ touch ${POT}
+ find modules/$module -iname "*.php" -exec xgettext -C -j -o ${POT} --language=PHP --keyword=_T {} \;
+ for name in `find modules/$module/locale -type f -name *.po`; do
+ echo -n "updating ${name}..."
+ msgmerge --update --add-location --sort-output ${name} ${POT}
+ echo "done"
+ done
+
done
exit 0

View File

@ -0,0 +1,20 @@
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Date: 2011-01-29
Initial Package Version: 1.4.2
Origin: me
Upstream Status: unknown
Description: don't install python module mmc and mmc.plugins
these are profided by mmc-core
diff -Naur pulse2-1.3.0.orig/services/setup.py pulse2-1.3.0/services/setup.py
--- pulse2-1.3.0.orig/services/setup.py 2011-01-29 11:59:30.000000000 +0000
+++ pulse2-1.3.0/services/setup.py 2011-01-29 11:59:46.000000000 +0000
@@ -35,8 +35,6 @@
maintainer = "Cedric Delfosse",
maintainer_email = "cdelfosse@mandriva.com",
packages = [
- "mmc",
- "mmc.plugins",
"mmc.plugins.dyngroup",
"mmc.plugins.dyngroup.querymanager",
"mmc.plugins.glpi",

View File

@ -0,0 +1,20 @@
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
need net mmc-agent
}
start() {
ebegin "Starting Pulse2 Imaging Server"
eval start-stop-daemon --start --quiet --exec /usr/sbin/pulse2-imaging-server --pidfile /var/run/pulse2-imaging-server.pid
eend $?
}
stop() {
ebegin "Stopping Pulse2 Imaging Server"
start-stop-daemon --stop --quiet --pidfile /var/run/pulse2-imaging-server.pid
eend $?
}

View File

@ -0,0 +1,78 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
SUPPORT_PYTHON_ABIS="1"
inherit eutils distutils
WOL_PV="0.7.1"
MY_P="${P/_p/-}"
MY_PV="${PV/_p*/}"
DESCRIPTION="Open Source Computer System Management !"
HOMEPAGE="http://pulse2.mandriva.org/"
SRC_URI="http://mds.mandriva.org/pub/pulse2/server/sources/${PV}/pulse2-${PV}.tar.gz
mirror://sourceforge/ahh/wol-${WOL_PV}.tar.gz"
LICENSE="GPL-2"
KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
IUSE=""
SLOT="0"
RDEPEND=">=app-admin/mmc-core-${PV}
!app-admin/pulse2-common
!app-admin/pulse2-launcher
!app-admin/pulse2-package-server
!app-admin/pulse2-inventory-server
!app-admin/pulse2-mmc-plugins
!app-admin/pulse2-scheduler
"
DEPEND="sys-apps/lsb-release"
S="${WORKDIR}/pulse2-${PV}/services"
src_prepare() {
pushd "${WORKDIR}"/pulse2-${PV}
epatch "${FILESDIR}"/pulse2-1.3.0-makefile-1.patch
epatch "${FILESDIR}"/pulse2-1.3.0-python_fix-1.patch
popd
distutils_src_prepare
}
src_configure() {
pushd "${WORKDIR}"/wol-${WOL_PV}
econf || die "configure failed"
popd
distutils_src_configure
}
src_compile() {
pushd "${WORKDIR}"/wol-${WOL_PV}
emake || die "make failed"
popd
distutils_src_compile
}
# from marienz's setuptools.eclass:
src_install() {
cp "${WORKDIR}"/wol-${WOL_PV}/src/wol bin/pulse2-wol
emake install_nopy PREFIX=/usr DESTDIR=${D}
distutils_src_install
newinitd "${FILESDIR}"/pulse2-inventory-server.initd pulse2-inventory-server
newinitd "${FILESDIR}"/pulse2-imaging-server.initd pulse2-imaging-server
newinitd "${FILESDIR}"/pulse2-launchers.initd pulse2-launchers
newinitd "${FILESDIR}"/pulse2-package-server.initd pulse2-package-server
newinitd "${FILESDIR}"/pulse2-scheduler.initd pulse2-scheduler
}
pkg_postinst() {
elog "To disable some plugin in your pulse2 environments, you have to set"
elog "disable to 1 in /etc/mmc/plugins/*.ini"
elog "(one config file per service)"
elog "You can't disable the base plugin."
}