Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 25530 | Differences between
and this patch

Collapse All | Expand All

(-)xmail-1.16.ebuild.orig (-20 / +28 lines)
Lines 12-18 Link Here
12
SLOT="0"
12
SLOT="0"
13
KEYWORDS="x86 ~sparc ~ppc"
13
KEYWORDS="x86 ~sparc ~ppc"
14
14
15
DEPEND="virtual/glibc"
15
DEPEND="virtual/glibc
16
	>=sys-apps/sed-4"
16
PROVIDE="virtual/mta"
17
PROVIDE="virtual/mta"
17
18
18
pkg_setup() {
19
pkg_setup() {
Lines 21-39 Link Here
21
}
22
}
22
23
23
src_compile() {
24
src_compile() {
25
	sed -i -e "s:^CFLAGS = -O2:CFLAGS=$CFLAGS:g" Makefile.lnx
26
27
	# Makefile does not setup dependencies properly to handle parallel build
24
	if use x86 ; then
28
	if use x86 ; then
25
		emake -f Makefile.lnx || die
29
		emake -j1 -f Makefile.lnx || die
26
	elif use sparc ; then
30
	elif use sparc ; then
27
		emake -f Makefile.slx || die
31
		emake -j1 -f Makefile.slx || die
28
	fi
32
	fi
29
	sed -e "s:/var/MailRoot:/etc/xmail:g" sendmail.sh > sendmail.sh.new
33
	sed -e "s:/var/MailRoot:/chroot/xmail/var/MailRoot:g" sendmail.sh > sendmail.sh.new
30
}
34
}
31
35
32
src_install() {
36
src_install() {
37
	# create some image directories with default diropts
38
	dodir /etc/conf.d
39
	dodir /etc/init.d
40
	dodir /etc/env.d
41
33
	einfo "Setting up directory hierarchy"
42
	einfo "Setting up directory hierarchy"
34
	diropts -m 700 -o xmail -g xmail
43
	diropts -m 700 -o xmail -g xmail
35
	dodir /etc/xmail
44
	dodir /etc/xmail
36
	dodir /chroot/xmail/var/MailRoot/bin
45
	keepdir /chroot/xmail/var/MailRoot/bin
37
	dodir /etc/xmail/tabindex
46
	dodir /etc/xmail/tabindex
38
	dodir /etc/xmail/dnscache/mx
47
	dodir /etc/xmail/dnscache/mx
39
	dodir /etc/xmail/dnscache/ns
48
	dodir /etc/xmail/dnscache/ns
Lines 43-61 Link Here
43
	dodir /etc/init.d
52
	dodir /etc/init.d
44
	dodir /etc/conf.d
53
	dodir /etc/conf.d
45
54
46
	touch ${D}/chroot/xmail/var/MailRoot/bin/.keep
47
48
	for i in cmdaliases custdomains domains filters pop3linklocks\
55
	for i in cmdaliases custdomains domains filters pop3linklocks\
49
		pop3links pop3locks userauth
56
		pop3links pop3locks userauth
50
	do
57
	do
51
		dodir /etc/xmail/${i}
58
		keepdir /etc/xmail/${i}
52
		touch ${D}/etc/xmail/${i}/.keep
53
	done
59
	done
54
60
55
	for i in pop3 smtp
61
	for i in pop3 smtp
56
	do
62
	do
57
		dodir /etc/xmail/userauth/${i}
63
		keepdir /etc/xmail/userauth/${i}
58
		touch ${D}/etc/xmail/userauth/${i}/.keep
59
	done
64
	done
60
	rm -f ${D}/etc/xmail/userauth/.keep
65
	rm -f ${D}/etc/xmail/userauth/.keep
61
66
Lines 67-83 Link Here
67
		message.id pop3.ipmap.tab smtp.ipmap.tab\
72
		message.id pop3.ipmap.tab smtp.ipmap.tab\
68
		userdef.tab
73
		userdef.tab
69
74
70
	umask 077
71
	for i in mailusers extaliases domains mailusers aliases \
75
	for i in mailusers extaliases domains mailusers aliases \
72
		aliasdomain extaliases pop3links smtpauth smtpextauth \
76
		aliasdomain extaliases pop3links smtpauth smtpextauth \
73
		smtpfwd smtprelay smtpgw spam-address spammers ctrlaccounts \
77
		smtpfwd smtprelay smtpgw spam-address spammers ctrlaccounts \
74
		filters.in filters.out
78
		filters.in filters.out
75
	do
79
	do
76
		touch ${D}/etc/xmail/${i}.tab
80
		touch ${D}/etc/xmail/${i}.tab
81
		fowners xmail:xmail /etc/xmail/${i}.tab
82
		fperms 600 /etc/xmail/${i}.tab
77
	done
83
	done
78
84
79
	einfo "Installing the XMail documentation"
85
	einfo "Installing the XMail documentation"
80
	umask 022
81
	dodoc ${S}/docs/*
86
	dodoc ${S}/docs/*
82
	dodoc ${S}/gpl.txt
87
	dodoc ${S}/gpl.txt
83
	dodoc ${S}/ToDo.txt
88
	dodoc ${S}/ToDo.txt
Lines 91-102 Link Here
91
	insinto /etc/conf.d
96
	insinto /etc/conf.d
92
	newins ${FILESDIR}/xmail.confd xmail
97
	newins ${FILESDIR}/xmail.confd xmail
93
	cd ${S}
98
	cd ${S}
94
	insopts -o xmail -g xmail -m 4700
99
	exeopts -o xmail -g xmail -m 4700
95
	newsbin sendmail sendmail.xmail
100
	exeinto /usr/sbin
96
	insopts -o xmail -g xmail -m 700
101
	newexe sendmail sendmail.xmail
102
	exeopts -o root -g root -m 755
103
	newexe sendmail.sh.new sendmail
104
	exeopts -o xmail -g xmail -m 700
97
	exeinto /chroot/xmail/var/MailRoot/bin
105
	exeinto /chroot/xmail/var/MailRoot/bin
98
	doexe CtrlClnt XMail XMCrypt MkUsers
106
	doexe CtrlClnt XMail XMCrypt MkUsers
99
	newsbin sendmail.sh.new sendmail
100
}
107
}
101
108
102
pkg_postinst() {
109
pkg_postinst() {
Lines 120-126 Link Here
120
127
121
	einfo "You can quickly configure XMail by running ${FILESDIR}/xmailwizard."
128
	einfo "You can quickly configure XMail by running ${FILESDIR}/xmailwizard."
122
129
123
	ewarn ""
130
	ewarn
124
	ewarn "Make sure you have iptables enabled in your kernel!"
131
	ewarn "Make sure you have iptables/netfilter with connection tracking"
125
	ewarn ""
132
	ewarn "and the REDIRECT target enabled in your kernel!"
133
	ewarn
126
}
134
}

Return to bug 25530