debian/0000755000000000000000000000000011540276332007171 5ustar debian/dirs0000644000000000000000000000005511313010441010036 0ustar etc/dhis-server usr/sbin usr/lib/dhis-server debian/compat0000644000000000000000000000000211313011167010356 0ustar 7 debian/copyright0000644000000000000000000000306611313010441011112 0ustar This package was debianized by Guus Sliepen on Sat, 22 Jun 2002 11:28:45 +0200. It was downloaded from http://www.dhis.org/dhis/r5/ Upstream Author: Joao Cabral Copyright: Copyright (c) 1998-2001 Joao Cabral (jcnc@dhis.org) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. DHIS(c) Dynamic Host Information System Release 5.1 debian/services.db0000644000000000000000000000043011313010441011301 0ustar ; ; DHIS R5 ; ; A DHIS services database example for services default and dns ; can be found in /usr/share/doc/dhis-server/exmamples. log 1 /usr/lib/dhis-server/dhis-dummy-log-engine ;dns 1 /usr/lib/dhis-server/dhis-dns-engine ;mx 1 /usr/lib/dhis-server/dhis-mx-sendmail-engine debian/dhis.db0000644000000000000000000000021511313010441010406 0ustar ; ; DHIS R5 Server Clients Database ; ; A sample DHIS database file for a DHIS server ; can be found in /usr/share/doc/dhis-server/examples. debian/docs0000644000000000000000000000003411313010441010022 0ustar README MODULES CONTRIBUTORS debian/control0000644000000000000000000000133511540276244010600 0ustar Source: dhis-server Section: net Priority: optional Maintainer: Guus Sliepen Build-Depends: debhelper (>> 7.0.0), libgmp-dev Standards-Version: 3.8.3 Homepage: http://www.dhis.org/ Package: dhis-server Architecture: any Depends: ${shlibs:Depends} Recommends: dhis-dns-engine, dhis-tools-dns Suggests: dhis-mx-sendmail-engine Description: Dynamic Host Information System - server DHIS is a client-server architecture meant to update databases for systems which are assigned a dynamic IP[v4] address. . By the means of a DHIS client a host which is assigned a dynamic IP address (either from its ISP or from DHCP) is able to communicate with a DHIS server in order to advertise its newly acquired IP address. debian/source/0000755000000000000000000000000011313011126010453 5ustar debian/source/format0000644000000000000000000000001411313011126011661 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000011313012014010577 5ustar debian/patches/fhs-compliance.diff0000644000000000000000000000107111313011146014325 0ustar --- dhis-server-5.3.orig/dhisd.h +++ dhis-server-5.3/dhisd.h @@ -64,10 +64,10 @@ #define CHECK_FAILS 3 /* maximum check fails */ #define DHISD_PORT 58800 -#define DHISD_PID "/etc/dhis/pid/dhisd.pid" -#define DHISD_DB "/etc/dhis/db/dhis.db" -#define DHISD_LOG "/etc/dhis/log/dhisd.log" -#define DHISD_SERVICES "/etc/dhis/db/services.db" +#define DHISD_PID "/var/run/dhisd.pid" +#define DHISD_DB "/etc/dhis-server/dhis.db" +#define DHISD_LOG "/var/log/dhisd.log" +#define DHISD_SERVICES "/etc/dhis-server/services.db" #define MAX_HOSTNAME 64 #define MAX_PASS 16 debian/patches/makefile-fixes.diff0000644000000000000000000000251511313011146014332 0ustar --- dhis-server-5.3.orig/Makefile +++ dhis-server-5.3/Makefile @@ -26,11 +26,14 @@ # DHIS(c) Dynamic Host Information System Release 5 CC=gcc -CFLAGS=-Wall -Wformat -I/usr/local/include # -DDONT_FORK -LFLAGS=-L/usr/local/lib +CFLAGS=-Wall -Wformat -O2 -pipe # -DDONT_FORK +LFLAGS= CP=cp -INSTALLDIR=/etc/dhis/bin +#INSTALLDIR=/etc/dhis/bin +ETCDIR=$(DESTDIR)/etc +SBINDIR=$(DESTDIR)/usr/sbin +LIBDIR=$(DESTDIR)/usr/lib/dhis-server MODE=700 OWNER=root MKDIR=mkdir -p @@ -43,20 +46,22 @@ OBJS=log.o network.o misc.o db.o online.o service.o main.o RM=rm -f -all: dhisd genkeys +all: dhisd #genkeys dhisd: $(OBJS) $(CC) $(LFLAGS) -o dhisd $(OBJS) $(LIBS) - strip dhisd + #strip dhisd genkeys: $(CC) $(CFLAGS) $(LFLAGS) genkeys.c -DQRC=1 -o genkeys -lgmp -install: dhisd genkeys - $(MKDIR) $(INSTALLDIR) - $(CP) dhisd genkeys $(INSTALLDIR) - $(CHOWN) $(OWNER) $(INSTALLDIR)/dhisd $(INSTALLDIR)/genkeys - $(CHMOD) $(MODE) $(INSTALLDIR)/dhisd $(INSTALLDIR)/genkeys +install: dhisd #genkeys + #$(MKDIR) $(INSTALLDIR) + $(CP) dhisd $(SBINDIR) + #$(CP) genkeys $(SBINDIR)/dhis-genkeys + $(CP) engines/dhis-dummy-log-engine.sh $(LIBDIR)/dhis-dummy-log-engine + #$(CHOWN) $(OWNER) $(INSTALLDIR)/dhisd $(INSTALLDIR)/genkeys + #$(CHMOD) $(MODE) $(INSTALLDIR)/dhisd $(INSTALLDIR)/genkeys clean: $(RM) *.core core genkeys dhisd *.o *~ debian/patches/series0000644000000000000000000000017711313011544012030 0ustar fhs-compliance.diff fix-tempfile-creation.diff makefile-fixes.diff no-unsigned-char.diff no-strict-aliasing.diff compat55.diff debian/patches/fix-tempfile-creation.diff0000644000000000000000000000212311313011146015627 0ustar From: Alexander Reichle-Schmehl --- dhis-server-5.3.orig/engines/dhis-dummy-log-engine.sh +++ dhis-server-5.3/engines/dhis-dummy-log-engine.sh @@ -1,15 +1,17 @@ #!/bin/sh -echo [$$] [`date`] Starting >> /tmp/dhis-dummy-log-engine.log +TEMPFILE=$(mktemp -t dhis-dummy-log-engine.log.XXXXXXXXXXXXX) + +echo [$$] [`date`] Starting >> "$TEMPFILE" while true do read line - echo [$$] `date` Received: $line >> /tmp/dhis-dummy-log-engine.log + echo [$$] `date` Received: $line >> "$TEMPFILE" case $line in 'exit') exit 0 ;; 'reload') - echo [$$] `date` RELOAD issued >> /tmp/dhis-dummy-log-engine.log + echo [$$] `date` RELOAD issued >> "$TEMPFILE" ;; esac @@ -18,13 +20,13 @@ case $cmd in 'add') - echo [$$] `date` $line >> /tmp/dhis-dummy-log-engine.log + echo [$$] `date` $line >> "$TEMPFILE" ;; 'update') - echo [$$] `date` $line >> /tmp/dhis-dummy-log-engine.log + echo [$$] `date` $line >> "$TEMPFILE" ;; 'delete') - echo [$$] `date` $line >> /tmp/dhis-dummy-log-engine.log + echo [$$] `date` $line >> "$TEMPFILE" ;; esac done debian/patches/no-strict-aliasing.diff0000644000000000000000000000037211313011403015143 0ustar --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ # DHIS(c) Dynamic Host Information System Release 5 CC=gcc -CFLAGS=-Wall -Wformat -O2 -pipe # -DDONT_FORK +CFLAGS=-Wall -Wformat -O2 -pipe -fno-strict-aliasing # -DDONT_FORK LFLAGS= CP=cp debian/patches/compat55.diff0000644000000000000000000000440611313011544013101 0ustar From: Peter Gervai diff -urN dhis-server-5.3/main.c dhis-server-5.3.new/main.c --- dhis-server-5.3/main.c 2009-08-14 00:28:29.000000000 +0200 +++ dhis-server-5.3.new/main.c 2009-08-14 00:24:00.667948834 +0200 @@ -352,6 +352,8 @@ if(msg.hdr.opcode==ECHO_REQ) { echo_ack_t m; + online_t *p; + echo_req_t *mp; DSYSLOG(1,(LOG_DEBUG,"do_dgram(): ECHO_REQ received. Sending ECHO_ACK.\n")); @@ -359,7 +361,25 @@ m.oserial=msg.hdr.serial; m.hdr.hostid=msg.hdr.hostid; net_write_message((msg_t *)&m,from,msg.hdr.rport); - return(1); + + /* hacking 5.3 server to handle 5.5 client msgs */ + mp=(echo_req_t *)&msg; + p=onbase; + while(p!=NULL) { + DSYSLOG(1,(LOG_DEBUG,"do_dgram(): ECHO_REQ hack checks online hosts; p.addr=%u p.id=%d from=%u h.id=%d\n", + p->addr, p->id, from, mp->hdr.hostid)); + if(p->addr==from && p->id==mp->hdr.hostid) break; + p=p->next; + } + if(p==NULL) return(0); + /* if(mp->sid!=p->sid) return(0); */ + DSYSLOG(1,(LOG_DEBUG,"do_dgram(): ECHO_REQ hack active to update presence (v5.5 compat). id=%d fail=%d\n", + p->id, p->check_fails)); + on_update(p->id,from,msg.hdr.rport,5,0); + p->ka=time(NULL) + p->refresh; + p->check_fails=0; + + return(1); } if(msg.hdr.opcode==CHECK_ACK) { diff -urN dhis-server-5.3/online.c dhis-server-5.3.new/online.c --- dhis-server-5.3/online.c 2009-08-14 00:28:29.000000000 +0200 +++ dhis-server-5.3.new/online.c 2009-08-14 00:03:42.225947655 +0200 @@ -185,11 +185,18 @@ p2=p1->next; if(p1->proto==3) - if((t - p1->ka) > KA_OFFLINE) + if((t - p1->ka) > KA_OFFLINE) { on_delete(p1->id); + DSYSLOG(1,(LOG_DEBUG,"on_parse(): Host %d is timed out, going offline\n", + p1->id)); + } + if(p1->proto==4 || p1->proto ==5) { - if(p1->check_fails > CHECK_FAILS) + if(p1->check_fails > CHECK_FAILS) { on_delete(p1->id); + DSYSLOG(1,(LOG_DEBUG,"on_parse(): Host %d failed %d checks, going offline\n", + p1->id, p1->check_fails)); + } else { if (p1->proto == 4) { if(p1->ka < time(NULL)) { debian/patches/no-unsigned-char.diff0000644000000000000000000003333111313011146014602 0ustar --- dhis-server-5.3.orig/db.c +++ dhis-server-5.3/db.c @@ -32,9 +32,9 @@ db_t *dbase=NULL; -unsigned char dbase_file[256]; +char dbase_file[256]; -int db_add_service(unsigned char *service,db_service_t **sbp) { +int db_add_service(char *service,db_service_t **sbp) { struct service_s *sp; db_service_t *bp; @@ -62,9 +62,9 @@ int db_reload(void) { FILE *fp; - unsigned char str[1024]; + char str[1024]; db_t *rec; - unsigned char keyn[1024]; + char keyn[1024]; if(dbase!=NULL) db_free(); @@ -76,7 +76,7 @@ off_nl(str); if(strchr(line_entry(1,str),';')==NULL) if(!strcmp(line_entry(2,str),"{")) { - unsigned char cmd[64]; + char cmd[64]; char *cp; rec=(db_t *)malloc(sizeof(db_t)); if(rec==NULL) { fclose(fp); return(0); } @@ -187,10 +187,10 @@ } -unsigned char *db_password(int id) { +char *db_password(int id) { db_t *p; - static unsigned char pass[MAX_PASS]; + static char pass[MAX_PASS]; p=dbase; while(p!=NULL) { @@ -263,7 +263,7 @@ return(NULL); } -unsigned char *db_get_oncmd(int id) { +char *db_get_oncmd(int id) { db_t *dp; dp=dbase; while(dp!=NULL) { @@ -273,7 +273,7 @@ return(NULL); } -unsigned char *db_get_offcmd(int id) { +char *db_get_offcmd(int id) { db_t *dp; dp=dbase; while(dp!=NULL) { --- dhis-server-5.3.orig/db.h +++ dhis-server-5.3/db.h @@ -35,7 +35,7 @@ typedef struct db_t { int id; - unsigned char pass[MAX_PASS]; + char pass[MAX_PASS]; int ltod; int atype; mpz_t authn; @@ -43,18 +43,18 @@ int refresh; mpz_t x; db_service_t *service; - unsigned char oncmd[256]; - unsigned char offcmd[256]; + char oncmd[256]; + char offcmd[256]; struct db_t *next; } db_t; int db_reload(void); int db_free(void); int db_add(db_t *); -unsigned char *db_password(int); +char *db_password(int); int db_get_ltod(int); int db_set_ltod(int,int); -int db_add_service(unsigned char *,db_service_t **); +int db_add_service(char *,db_service_t **); db_service_t *db_get_service_by_id(int); -unsigned char *db_get_oncmd(int); -unsigned char *db_get_offcmd(int); +char *db_get_oncmd(int); +char *db_get_offcmd(int); --- dhis-server-5.3.orig/log.c +++ dhis-server-5.3/log.c @@ -31,13 +31,13 @@ #include "misc.h" FILE *flog; -unsigned char logfile[256]; +char logfile[256]; -int msg_log(unsigned char *msg) { +int msg_log(char *msg) { time_t tt; - unsigned char buff[256]; + char buff[256]; DSYSLOG(1,(LOG_DEBUG,"msg_log(): Logging %s\n",msg)); --- dhis-server-5.3.orig/log.h +++ dhis-server-5.3/log.h @@ -26,4 +26,4 @@ * DHIS(c) Dynamic Host Information System Release 5 */ -int msg_log(unsigned char *); +int msg_log(char *); --- dhis-server-5.3.orig/main.c +++ dhis-server-5.3/main.c @@ -39,16 +39,16 @@ extern online_t *onbase; extern db_t *dbase; -extern unsigned char logfile[256]; -extern unsigned char dbase_file[256]; +extern char logfile[256]; +extern char dbase_file[256]; -unsigned char services_file[256]; -unsigned char pid_file[256]; +char services_file[256]; +char pid_file[256]; int rport=DHISD_PORT; /* R3 hashing function */ -int pass_encrypt(unsigned char *pass,int n) { +int pass_encrypt(char *pass,int n) { int res=0; @@ -70,7 +70,7 @@ if(msg.hdr.versionsp->service, id,addr,oaddr); @@ -468,7 +468,7 @@ while(sp!=NULL) { fsp=sp->fdp; while(fsp!=NULL) { - unsigned char str[32]; + char str[32]; sprintf(str,"%s\n",SEXIT); write(fsp->fd,str,strlen(str)); close(fsp->fd); @@ -488,7 +488,7 @@ while(sp!=NULL) { fsp=sp->fdp; while(fsp!=NULL) { - unsigned char str[32]; + char str[32]; sprintf(str,"%s\n",SRELOAD); write(fsp->fd,str,strlen(str)); fsp=fsp->next; --- dhis-server-5.3.orig/genkeys.c +++ dhis-server-5.3/genkeys.c @@ -97,9 +97,9 @@ void show_key(mpz_t key,int n,char *s) { - unsigned char buff[1024]; - unsigned char chunk[128]; - unsigned char *cp; + char buff[1024]; + char chunk[128]; + char *cp; int i; mpz_get_str(buff,10,key); debian/examples0000644000000000000000000000004211313010441010707 0ustar dhis.db.sample services.db.sample debian/dhisd.80000644000000000000000000000501011313010441010332 0ustar .Dd 2002-06-22 .Dt DHISD 8 .Os "Debian GNU/Linux" .\" Manual page created by Guus Sliepen .Sh NAME .Nm dhisd .Nd Dynamic Host Information System server. .Sh SYNOPSIS .Nm .Op Fl D .Op Fl p Ar port .Op Fl d Ar database .Op Fl s Ar services .Op Fl l Ar logfile .Op Fl P Ar pidfile .Sh DESCRIPTION DHIS is a client-server architecture meant to update databases for systems which are assigned a dynamic IP[v4] address. .Pp By the means of a DHIS client a host which is assigned a dynamic IP address (either from its ISP or from DHCP) is able to communicate with a DHIS server in order to advertise its newly acquired IP address. .Pp DHIS comprises a UDP based protocol to achieve this purpose. .Pp A DHIS client has a unique identification number and a set of authentication keys, runs in background, and attempts to reach its server. .Pp The DHIS server (permanently online) listens to UDP messages from its clients and authenticates these against its knowledge of keys. When authentication is successful the DHIS server updates one or more databases with the newly received IP address for the given client. .Pp The server then keeps sending, every period of time, check requests to each of its connected clients. These need to be acknowledged. If not the server will consider, on an individual basis, that the client has disconnected and will again update the databases to an offline state. .Pp Alternativelly the server may receive an OFFLINE_REQ packet from the client, in which case the DNS record is updated at once and the online state droped. .Sh OPTIONS .Bl -tag -width indent .It Fl D Increase debug level. .It Fl p Ar port Specify port to listen on. If not specified, the default is port 58800. .It Fl d Ar database Use an alternative database file instead of .Pa /etc/dhis-server/dhis.db . .It Fl s Ar services Use an alternative database file instead of .Pa /etc/dhis-server/services.db . .It Fl l Ar logfile Use an alternative log file instead of .Pa /var/log/dhisd.log . .It Fl P Ar pidfile Use an alternative PID file instead of .Pa /var/run/dhisd.pid . .El .Sh FILES .Bl -tag -width indent .It Pa /etc/dhis-server/dhis.db DHIS client database. Contains the credentials of clients. .It Pa /etc/dhis-server/services.db DHIS service database. Contains a list of services and the location of the corresponding DHIS engine plugins. .El .Sh SEE ALSO .Xr dhis-genkeys 8 .Sh AUTHOR .Nm has been written by .An Joao Cabral Aq jcnc@dhis.org . .Pp This manual page was written by .An Guus Sliepen Aq guus@debian.org for the Debian GNU/Linux system. debian/changelog0000644000000000000000000000525611540276322011052 0ustar dhis-server (5.3-2.1) unstable; urgency=low * NMU. Change dependency libgmp3-dev --> libgmp-dev. -- Steve M. Robbins Wed, 16 Mar 2011 22:15:23 -0500 dhis-server (5.3-2) unstable; urgency=low * Adopt 3.0 (quilt) format. * Bump Standards-Version. * Use dh_prep instead of dh_clean -k. * Compile with -fno-strict-aliasing. * Apply patch from Peter Gervai restoring compatibility with version 5.5 clients. Closes: #516292 -- Guus Sliepen Sat, 19 Dec 2009 00:38:53 +0100 dhis-server (5.3-1.2) unstable; urgency=low * Non-maintainer upload. * Temporary files are to be created in /tmp not in current directory -- Alexander Reichle-Schmehl Tue, 09 Sep 2008 22:34:56 +0200 dhis-server (5.3-1.1) unstable; urgency=low * Non-maintainer upload. * Fixing unsave tempfile creation (Closes: #496388) -- Alexander Reichle-Schmehl Tue, 09 Sep 2008 20:55:31 +0200 dhis-server (5.3-1) unstable; urgency=low * New upstream release. - Fixes parsing of comments in database file. Closes: #458862 -- Guus Sliepen Sat, 05 Jan 2008 22:08:50 +0100 dhis-server (5.2-4) unstable; urgency=low * Build with gcc, not with gcc-4.2. -- Guus Sliepen Tue, 14 Aug 2007 13:54:06 +0200 dhis-server (5.2-3) unstable; urgency=low * Remove strip command from Makefile. Closes: #436764 -- Guus Sliepen Tue, 14 Aug 2007 13:40:14 +0200 dhis-server (5.2-2) unstable; urgency=low * Add LSB section to the init script. -- Guus Sliepen Sat, 18 Nov 2006 13:10:41 +0100 dhis-server (5.2-1) unstable; urgency=low * New upstream release. Closes: #372555 * Remove warnings caused by silly use of unsigned char. -- Guus Sliepen Tue, 13 Jun 2006 13:03:38 +0200 dhis-server (5.1-5) unstable; urgency=low * Link against libgmp3c2. Closes: #329272 * Add missing .El tag in manpage. -- Guus Sliepen Wed, 21 Sep 2005 15:24:08 +0200 dhis-server (5.1-4) unstable; urgency=low * Don't let restart fail if daemon is not running. -- Guus Sliepen Sun, 18 Jan 2004 14:51:47 +0100 dhis-server (5.1-3) unstable; urgency=low * Remove unused #include . Closes: #195294 -- Guus Sliepen Fri, 30 May 2003 11:11:43 +0200 dhis-server (5.1-2) unstable; urgency=low * Added build-dependency on libgmp3-dev. * Recommend dhis-tools-dns instead of dhis-tools. -- Guus Sliepen Sat, 22 Jun 2002 22:53:39 +0200 dhis-server (5.1-1) unstable; urgency=low * Initial Release. -- Guus Sliepen Sat, 22 Jun 2002 11:28:45 +0200 debian/init.d0000644000000000000000000000331311313010441010262 0ustar #! /bin/sh # ### BEGIN INIT INFO # Provides: dhis-server # Required-Start: $network # Required-Stop: $network # Should-Start: $syslog $named # Should-Stop: $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start the Dynamic Host Information System server # Description: DHIS is a client-server architecture meant to update # databases for systems which are assigned a dynamic IP[v4] # address. By the means of a DHIS client a host which is # assigned a dynamic IP address (either from its ISP or from # DHCP) is able to communicate with a DHIS server in order # to advertise its newly acquired IP address. ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/dhisd NAME=dhisd DESC=dhis-server test -f $DAEMON || exit 0 set -e case "$1" in start) echo -n "Starting $DESC: $NAME" start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON echo "." ;; stop) echo -n "Stopping $DESC: $NAME" start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON echo "." ;; reload|force-reload) echo "Reloading $DESC configuration files." start-stop-daemon --stop --signal 1 --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON ;; restart) echo -n "Restarting $DESC: $NAME" start-stop-daemon --oknodo --stop --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON sleep 1 start-stop-daemon --start --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON echo "." ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 exit 1 ;; esac exit 0 debian/rules0000755000000000000000000000341111313011176010237 0ustar #!/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 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. $(MAKE) #/usr/bin/docbook-to-man debian/dhis-server.sgml > dhis-server.1 touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. $(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs # Add here commands to install the package into debian/dhis-server. $(MAKE) install DESTDIR=$(CURDIR)/debian/dhis-server cp debian/dhis.db debian/services.db $(CURDIR)/debian/dhis-server/etc/dhis-server/ # 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_installdebconf dh_installdocs dh_installexamples # dh_installmenu # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime dh_installinit # dh_installcron dh_installman debian/dhisd.8 # dh_installinfo # dh_undocumented dh_installchangelogs dh_link dh_strip dh_compress dh_fixperms # dh_makeshlibs dh_installdeb # dh_perl dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure