Ver Fonte

debianization

Jindrich Makovicka há 20 anos atrás
pai
commit
d6040e0161
8 ficheiros alterados com 132 adições e 6 exclusões
  1. 3 0
      ChangeLog
  2. 14 5
      Makefile
  3. 5 0
      debian/changelog
  4. 13 0
      debian/control
  5. 24 0
      debian/copyright
  6. 3 0
      debian/gkrellm-multiping.postinst
  7. 69 0
      debian/rules
  8. 1 1
      multiping.c

+ 3 - 0
ChangeLog

@@ -1,3 +1,6 @@
+2.0.11
+	* debianization
+
 2.0.10 (2005-03-25)
 	* added README file
 	* fixed setting of the installation path

+ 14 - 5
Makefile

@@ -1,4 +1,12 @@
-INSTALLDIR = /usr/local/lib/gkrellm2/plugins
+ifeq ($(INSTALLROOT),)
+INSTALLROOT = /usr/local
+endif
+ifeq ($(PLUGINDIR),)
+PLUGINDIR=$(INSTALLROOT)/lib/gkrellm2/plugins
+endif
+ifeq ($(HELPERDIR),)
+HELPERDIR=$(INSTALLROOT)/lib/gkrellm2/exec
+endif
 VERSION = 2.0.10
 PKGNAME = gkrellm-multiping
 CC = gcc
@@ -10,7 +18,7 @@ pinger: pinger.c
 
 multiping.o: multiping.c decal_multiping_status.xpm
 	$(CC) -Wall -fPIC -Wall `pkg-config gtk+-2.0 --cflags` $(OPT) \
-	-DINSTALLDIR=\"$(INSTALLDIR)\" -DVERSION=\"$(VERSION)\" -c multiping.c
+	-DHELPERDIR=\"$(HELPERDIR)\" -DVERSION=\"$(VERSION)\" -c multiping.c
 
 multiping.so: multiping.o
 	$(CC) -shared -Wl -ggdb `pkg-config gtk+-2.0 --libs`-o multiping.so multiping.o
@@ -19,9 +27,10 @@ clean:
 	rm -f *.o *.so pinger core
 
 install: pinger multiping.so
-	install -d $(INSTALLDIR)
-	install -c -s -m 644 multiping.so $(INSTALLDIR)
-	install -c -s -m 4755 pinger $(INSTALLDIR)
+	install -d $(PLUGINDIR)
+	install -d $(HELPERDIR)
+	install -c -s -m 644 multiping.so $(PLUGINDIR)
+	install -c -s -m 4755 pinger $(HELPERDIR)
 	echo "pinger helper is installed suid root"
 
 dist:

+ 5 - 0
debian/changelog

@@ -0,0 +1,5 @@
+gkrellm-multiping (2.0.11) unstable; urgency=low
+
+  * Initial release.
+
+ -- Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>  Sat, 17 Dec 2005 14:44:33 +0100

+ 13 - 0
debian/control

@@ -0,0 +1,13 @@
+Source: gkrellm-multiping
+Section: x11
+Priority: optional
+Maintainer: Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
+Build-Depends: debhelper (>= 4.1.0), gkrellm2, libgtk2.0-dev
+Standards-Version: 3.6.1.1
+
+Package: gkrellm-multiping
+Architecture: any
+Depends: gkrellm2, ${shlibs:Depends}
+Description: GkrellM Multiping Plugin
+ Can ping multiple hosts at once and display their status
+ and current trip time

+ 24 - 0
debian/copyright

@@ -0,0 +1,24 @@
+Upstream Author: Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
+
+Part of the code is based on inetutils' Ping, which is copyrighted by
+The Regents of the University of California under the BSD license.
+
+Copyright:
+
+   This package 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; version 2 dated June, 1991.
+
+   This package 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 package; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+

+ 3 - 0
debian/gkrellm-multiping.postinst

@@ -0,0 +1,3 @@
+#!/bin/sh
+
+chmod 4755 /usr/lib/gkrellm2/exec/pinger

+ 69 - 0
debian/rules

@@ -0,0 +1,69 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use.
+export DH_COMPAT=4
+
+package := gkrellm-multiping
+prefix := $(shell pwd)/debian/$(package)
+
+CFLAGS = -g -Wall
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS += -O0
+else
+CFLAGS += -O2
+endif
+
+
+build: 
+	dh_testdir
+
+	# Add here commands to compile the package.
+	$(MAKE) INSTALLROOT=/usr
+
+
+clean:
+	dh_testdir
+	dh_testroot
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) clean
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/gkrellm-multiping.
+	$(MAKE) install INSTALLROOT=$(prefix)/usr
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs
+	dh_installchangelogs ChangeLog
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure

+ 1 - 1
multiping.c

@@ -30,7 +30,7 @@ ____________________________________________________________________________*/
 #define	CONFIG_NAME	"Multiping"
 #define	STYLE_NAME	"multiping"
 
-#define COMMAND INSTALLDIR"/pinger"
+#define COMMAND HELPERDIR"/pinger"
 
 static GkrellmMonitor *monitor;
 static GkrellmPanel *panel;