Index: devel/liblockfile/Makefile =================================================================== --- devel/liblockfile/Makefile (nonexistent) +++ devel/liblockfile/Makefile (working copy) @@ -0,0 +1,39 @@ +# Created by: Yasuhiro KIMURA +# $FreeBSD$ + +PORTNAME= liblockfile +PORTVERSION= 1.14 +DISTVERSIONPREFIX= v +CATEGORIES= devel + +MAINTAINER= yasu@utahime.org +COMMENT= Standard lockfile library + +LICENSE= GPLv2+ LGPL21+ +LICENSE_COMB= multi +LICENSE_FILE_GPLv2+ = ${WRKSRC}/licenses/GPL-2 +LICENSE_FILE_LGPL21+ = ${WRKSRC}/licenses/LGPL-2 + +USE_GITHUB= yes +GH_ACCOUNT= miquels + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --enable-shared --with-mailgroup + +USE_LDCONFIG= yes + +PORTDOCS= Changelog README + +OPTIONS_DEFINE= DOCS + +post-install: + ${INSTALL_MAN} ${WRKSRC}/*.1 ${STAGEDIR}${MANPREFIX}/man/man1 + ${INSTALL_MAN} ${WRKSRC}/*.3 ${STAGEDIR}${MANPREFIX}/man/man3 + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}/${DOCSDIR} +.for f in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} +.endfor + +.include Index: devel/liblockfile/distinfo =================================================================== --- devel/liblockfile/distinfo (nonexistent) +++ devel/liblockfile/distinfo (working copy) @@ -0,0 +1,3 @@ +TIMESTAMP = 1513860470 +SHA256 (miquels-liblockfile-v1.14_GH0.tar.gz) = be85dba347889d9b65cbd361a611e6b88e044fdca9c98e5139d5fbc9ba37ccc8 +SIZE (miquels-liblockfile-v1.14_GH0.tar.gz) = 67813 Index: devel/liblockfile/files/patch-Makefile.in =================================================================== --- devel/liblockfile/files/patch-Makefile.in (nonexistent) +++ devel/liblockfile/files/patch-Makefile.in (working copy) @@ -0,0 +1,40 @@ +--- Makefile.in.orig 2017-01-17 13:21:05 UTC ++++ Makefile.in +@@ -49,34 +49,21 @@ xlockfile.o: lockfile.c + $(CC) $(CFLAGS) -c lockfile.c -o xlockfile.o + + install_static: static install_common +- install -d -m 755 -g root -p $(libdir) + install -m 644 liblockfile.a $(libdir) + + install_shared: shared install_static install_common +- install -d -m 755 -g root -p $(libdir) +- install -m 755 liblockfile.so \ ++ install -s -m 755 liblockfile.so \ + $(libdir)/liblockfile.so.$(SOVER) + ln -s liblockfile.so.$(SOVER) $(libdir)/liblockfile.so.$(MAJOR) + ln -s liblockfile.so.$(SOVER) $(libdir)/liblockfile.so + if test "$(DESTDIR)" = ""; then @LDCONFIG@; fi + + install_common: +- install -d -m 755 -g root -p $(includedir) +- install -d -m 755 -g root -p $(bindir) +- install -d -m 755 -g root -p $(mandir)/man1 +- install -d -m 755 -g root -p $(mandir)/man3 + install -m 644 lockfile.h maillock.h $(includedir) +- if [ "$(MAILGROUP)" != "" ]; then\ +- install -g $(MAILGROUP) -m 2755 dotlockfile $(bindir);\ +- else \ +- install -g root -m 755 dotlockfile $(bindir); \ +- fi +- install -m 644 *.1 $(mandir)/man1 +- install -m 644 *.3 $(mandir)/man3 ++ install -s -m 755 dotlockfile $(bindir); \ + + install_nfslib: nfslib +- install -d -m 755 -g root -p $(nfslockdir) +- install -m 755 nfslock.so.$(NFSVER) $(nfslockdir) ++ install -s -m 755 nfslock.so.$(NFSVER) $(nfslockdir) + if test "$(DESTDIR)" = ""; then @LDCONFIG@; fi + + clean: Index: devel/liblockfile/pkg-descr =================================================================== --- devel/liblockfile/pkg-descr (nonexistent) +++ devel/liblockfile/pkg-descr (working copy) @@ -0,0 +1,24 @@ +This library implements a number of functions found in -lmail on SysV +systems. These functions are designed to lock the standard mailboxes in +/var/mail (or wherever the system puts them). + +In additions, this library adds a number of functions to create, +manage and remove generic lockfiles. + +The lockfiles are created by this library in an NFS-safe manner, that +is by using a tempfile and using link(2) to create the lockfile. It +works around several defects in NFS servers to make sure the lockfile +is created atomically. + +The locking strategy is compatible with other well-written NFS-safe +programs that create lockfiles - such as procmail, exim and mutt. + +If you are trying to lock a mailbox in a directory writable for group +mail, the locking functions will call a helper application which runs +setgid to do the actual locking. The helper application "dotlockfile" +can also be used directly, for example for use in shellscripts. + +This means a program such as a MUA doesn't need to be setgid mail anymore +to be able to lock the mailbox. + +WWW: https://github.com/miquels/liblockfile Index: devel/liblockfile/pkg-plist =================================================================== --- devel/liblockfile/pkg-plist (nonexistent) +++ devel/liblockfile/pkg-plist (working copy) @@ -0,0 +1,11 @@ +@comment $FreeBSD$ +@(,mail,2755) bin/dotlockfile +include/lockfile.h +include/maillock.h +lib/liblockfile.a +lib/liblockfile.so +lib/liblockfile.so.1 +lib/liblockfile.so.1.0 +man/man1/dotlockfile.1.gz +man/man3/lockfile_create.3.gz +man/man3/maillock.3.gz