]> git.ipfire.org Git - people/ms/dma.git/commitdiff
Change BSD Makefiles so dma-mbox-create can be built
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Wed, 18 Mar 2015 16:49:01 +0000 (17:49 +0100)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Thu, 19 Mar 2015 12:14:12 +0000 (13:14 +0100)
README.markdown
bsd/Makefile [new file with mode: 0644]
bsd/dma-mbox-create/Makefile [new file with mode: 0644]
bsd/dma/Makefile [moved from BSDmakefile with 83% similarity]
get-version.sh

index 13ff20c9aa417308ad607e217372164b06550a98..3e043de33df9ed8000efd26aa3fb6453c98f64c4 100644 (file)
@@ -15,8 +15,13 @@ incoming connections.
 Building
 --------
 
+In Linux:
+
        make
 
+In BSD:
+
+       cd bsd && make
 
 Installation
 ------------
diff --git a/bsd/Makefile b/bsd/Makefile
new file mode 100644 (file)
index 0000000..6813708
--- /dev/null
@@ -0,0 +1,3 @@
+SUBDIR= dma dma-mbox-create
+
+.include <bsd.subdir.mk>
diff --git a/bsd/dma-mbox-create/Makefile b/bsd/dma-mbox-create/Makefile
new file mode 100644 (file)
index 0000000..28af5c3
--- /dev/null
@@ -0,0 +1,23 @@
+#
+
+version!=      sh ../../get-version.sh ../../VERSION
+
+CFLAGS+= -I${.CURDIR}/../..
+CFLAGS+= -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME
+CFLAGS+= -DLIBEXEC_PATH='"${LIBEXEC}"' -DDMA_VERSION='"${version}"'
+CFLAGS+= -DCONF_PATH='"${CONFDIR}"'
+
+PROG=  dma-mbox-create
+.PATH: ${.CURDIR}/../..
+SRCS+= dma-mbox-create.c
+NOMAN=
+
+PREFIX?=       /usr/local
+LIBEXEC?=      ${PREFIX}/libexec
+CONFDIR?=      ${PREFIX}/etc/dma
+
+BINOWN= root
+BINGRP= mail
+BINMODE=4554
+
+.include <bsd.prog.mk>
similarity index 83%
rename from BSDmakefile
rename to bsd/dma/Makefile
index af3a0ac7c34f1fa51e1b4b1c10234e2f3de1e564..6b8ff0ac5b639eb8a0f4695c8e517d0a2b7dab00 100644 (file)
@@ -1,9 +1,9 @@
 # $DragonFly: src/libexec/dma/Makefile,v 1.5 2008/09/19 00:36:57 corecode Exp $
 #
 
-version!=      sh get-version.sh
+version!=       sh ../../get-version.sh ../../VERSION
 
-CFLAGS+= -I${.CURDIR}
+CFLAGS+= -I${.CURDIR}/../..
 CFLAGS+= -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME
 CFLAGS+= -DLIBEXEC_PATH='"${LIBEXEC}"' -DDMA_VERSION='"${version}"'
 CFLAGS+= -DCONF_PATH='"${CONFDIR}"'
@@ -12,6 +12,7 @@ DPADD=  ${LIBSSL} ${LIBCRYPTO}
 LDADD=  -lssl -lcrypto
 
 PROG=  dma
+.PATH: ${.CURDIR}/../..
 SRCS=  aliases_parse.y aliases_scan.l base64.c conf.c crypto.c
 SRCS+= dma.c dns.c local.c mail.c net.c spool.c util.c
 MAN=   dma.8
@@ -23,6 +24,6 @@ CONFDIR?=     ${PREFIX}/etc/dma
 BINOWN= root
 BINGRP= mail
 BINMODE=2555
-WARNS?=        6
+WARNS?=        5
 
 .include <bsd.prog.mk>
index aecc3331f446311d8bac4993c1618d3e638a6f30..d9691ac37c95f5c6775a0a9e48578d2989dd42c3 100644 (file)
@@ -1,7 +1,9 @@
 #!/bin/sh
 
+tmp=$1
+file=${tmp:=VERSION}
 gitver=$(git describe 2>/dev/null | tr - .)
-filever=$(cat VERSION)
+filever=$(cat ${file} 2>/dev/null)
 
 version=${gitver}
 : ${version:=$filever}