forked from omniti-labs/omnios-build
-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #428 from hadfl/dma
dma added (as default MTA)
- Loading branch information
Showing
11 changed files
with
559 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/usr/bin/bash | ||
# | ||
# {{{ CDDL HEADER | ||
# | ||
# This file and its contents are supplied under the terms of the | ||
# Common Development and Distribution License ("CDDL"), version 1.0. | ||
# You may only use this file in accordance with the terms of version | ||
# 1.0 of the CDDL. | ||
# | ||
# A full copy of the text of the CDDL should have accompanied this | ||
# source. A copy of the CDDL is also available via the Internet at | ||
# http://www.illumos.org/license/CDDL. | ||
# }}} | ||
# | ||
# Copyright 2017 OmniOS Community Edition (OmniOSce) Association. | ||
# | ||
# | ||
# Load support functions | ||
. ../../lib/functions.sh | ||
|
||
PROG=dma | ||
VER=0.11 | ||
VERHUMAN=$VER | ||
PKG=service/network/smtp/dma | ||
SUMMARY="The DragonFly Mail Agent" | ||
DESC="$SUMMARY" | ||
|
||
BUILDARCH=32 | ||
|
||
# adding ASLR flags to compiler and linker since | ||
# dma: gets ASLR if linker flag is set | ||
# dma-mbox-create: gets ASLR if compiler flag is set | ||
export CFLAGS="-O -pipe -Wl,-z,aslr -DHAVE_STRLCPY -DHAVE_GETPROGNAME" | ||
export LDADD="-Wl,-z,aslr -lssl -lcrypto -lresolv -lsocket -lnsl" | ||
|
||
export PREFIX=/usr | ||
export SBIN=${PREFIX}/lib/smtp/dma | ||
export LIBEXEC=${PREFIX}/lib/smtp/dma | ||
|
||
# No configure | ||
configure32() { | ||
export CC=gcc | ||
export YACC=bison | ||
export LEX=flex | ||
} | ||
|
||
make_install() { | ||
logmsg "--- make install" | ||
logcmd $MAKE DESTDIR=${DESTDIR} install install-spool-dirs install-etc || \ | ||
logerr "--- Make install failed" | ||
|
||
logmsg "--- copying aliases template" | ||
logcmd mkdir -p $DESTDIR/etc/dma || logerr "--- failed to create dir" | ||
logcmd cp $SRCDIR/files/aliases $DESTDIR/etc/dma/aliases || \ | ||
logerr "--- failed to copy aliases" | ||
} | ||
|
||
init | ||
download_source $PROG "v$VER" | ||
patch_source | ||
prep_build | ||
build | ||
make_isa_stub | ||
make_package | ||
clean_up | ||
|
||
# Vim hints | ||
# vim:ts=4:sw=4:et:fdm=marker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## | ||
# The aliases file is of the format | ||
# nam: dest1 dest2 ... | ||
# In this case, mails to nam will instead be delivered to dest1 and | ||
# dest2, which in turn could be entries in /etc/aliases. The special | ||
# name ‘*’ can be used to create a catch-all alias, which gets used | ||
# if no other matching alias is found. Use the catch-all alias only | ||
# if you don't want any local mail to be delivered. | ||
## | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# CDDL HEADER START | ||
# | ||
# The contents of this file are subject to the terms of the | ||
# Common Development and Distribution License, Version 1.0 only | ||
# (the "License"). You may not use this file except in compliance | ||
# with the License. | ||
# | ||
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | ||
# or http://www.opensolaris.org/os/licensing. | ||
# See the License for the specific language governing permissions | ||
# and limitations under the License. | ||
# | ||
# When distributing Covered Code, include this CDDL HEADER in each | ||
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. | ||
# If applicable, add the following below this CDDL HEADER, with the | ||
# fields enclosed by brackets "[]" replaced with your own identifying | ||
# information: Portions Copyright [yyyy] [name of copyright owner] | ||
# | ||
# CDDL HEADER END | ||
# | ||
# | ||
# Copyright 2017 OmniOS Community Edition. All rights reserved. | ||
# Use is subject to license terms. | ||
user username=dma uid=26 group=mail gcos-field="DragonFly Mail Agent" \ | ||
home-dir=/ password=NP | ||
|
||
<transform dir path=var/mail$ -> drop> | ||
<transform file path=etc/dma/ -> set preserve renamenew> | ||
<transform file dir path=etc/dma -> set group mail> | ||
<transform file path=usr/lib/smtp/dma -> set group mail> | ||
<transform file path=usr/lib/smtp/dma/dma -> set mode 2755> | ||
<transform file path=usr/lib/smtp/dma/dma-mbox-create -> set mode 4754> | ||
<transform dir path=var/spool/dma -> set mode 0770> | ||
<transform dir path=var/spool/dma -> set group mail> | ||
|
||
# Mediated symlinks | ||
link path=usr/bin/mailq mediator=mta mediator-implementation=dma \ | ||
mediator-priority=vendor target=../lib/smtp/dma/dma | ||
link path=usr/lib/sendmail mediator=mta mediator-implementation=dma \ | ||
mediator-priority=vendor target=../lib/smtp/dma/dma | ||
link path=usr/sbin/sendmail mediator=mta mediator-implementation=dma \ | ||
mediator-priority=vendor target=../lib/smtp/dma/dma | ||
link path=usr/sbin/newaliases mediator=mta mediator-implementation=dma \ | ||
mediator-priority=vendor target=../lib/smtp/dma/dma | ||
link path=etc/aliases mediator=mta mediator-implementation=dma \ | ||
mediator-priority=vendor target=./dma/aliases | ||
|
||
license LICENSE license=BSD |
Oops, something went wrong.