Browse Source

dovecot: import from packages

Signed-off-by: Peter Wagner <tripolar@gmx.at>
Peter Wagner 10 years ago
parent
commit
f8ba70a8a1

+ 76
- 0
mail/dovecot/Makefile View File

1
+#
2
+# Copyright (C) 2006-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=dovecot
11
+PKG_VERSION:=2.2.13
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://www.dovecot.org/releases/2.2
16
+PKG_MD5SUM:=a3eb1c0b1822c4f2b0fe9247776baa71
17
+
18
+PKG_BUILD_DEPENDS:=libiconv
19
+
20
+PKG_FIXUP:=autoreconf
21
+PKG_INSTALL:=1
22
+
23
+include $(INCLUDE_DIR)/package.mk
24
+
25
+define Package/dovecot
26
+  SECTION:=mail
27
+  CATEGORY:=Mail
28
+  DEPENDS:=+libopenssl +librt +zlib +libbz2 +libcap
29
+  TITLE:=An IMAP and POP3 daemon
30
+  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
31
+  URL:=http://www.dovecot.org/
32
+endef
33
+
34
+define Package/dovecot/description
35
+ Dovecot is a program which provides POP3 and IMAP services.
36
+endef
37
+
38
+CONFIGURE_ARGS += \
39
+	--without-gssapi \
40
+	--without-pam \
41
+	--with-moduledir=/usr/lib/dovecot/modules \
42
+	--with-notify=dnotify \
43
+	--without-lzma \
44
+	--without-lz4
45
+
46
+CONFIGURE_VARS += \
47
+	RPCGEN= \
48
+	i_cv_signed_size_t=no \
49
+	i_cv_signed_time_t=no \
50
+	i_cv_gmtime_max_time_t=32 \
51
+	i_cv_mmap_plays_with_write=yes \
52
+	i_cv_fd_passing=yes \
53
+	i_cv_c99_vsnprintf=yes \
54
+	lib_cv_va_copy=yes \
55
+	lib_cv_va_copy=yes \
56
+	lib_cv___va_copy=yes \
57
+	lib_cv_va_val_copy=yes
58
+
59
+define Package/dovecot/install
60
+	$(INSTALL_DIR)  $(1)/etc/init.d \
61
+			$(1)/etc/dovecot \
62
+			$(1)/usr/share/doc/dovecot/example-config \
63
+			$(1)/usr/lib/dovecot \
64
+			$(1)/usr/bin \
65
+			$(1)/usr/sbin
66
+	$(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/
67
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
68
+	$(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/example-config
69
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
70
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
71
+	$(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
72
+	rm  $(1)/usr/lib/dovecot/dovecot-config
73
+	find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm
74
+endef
75
+
76
+$(eval $(call BuildPackage,dovecot))

+ 18
- 0
mail/dovecot/files/dovecot.init View File

1
+#!/bin/sh /etc/rc.common
2
+# Copyright (C) 2006-2013 OpenWrt.org
3
+
4
+START=75
5
+STOP=75
6
+
7
+USE_PROCD=1
8
+
9
+start_service() {
10
+	user_exists dovecot 59 || user_add dovecot 59
11
+	group_exists dovecot 59 || group_add dovecot 59
12
+	mkdir -p -m 0755 /var/lib/dovecot
13
+	mkdir -p -m 0755 /var/run/dovecot
14
+	chmod 0750 /var/lib/dovecot
15
+	procd_open_instance
16
+	procd_set_param command /usr/sbin/dovecot -F
17
+	procd_close_instance
18
+}

+ 31
- 0
mail/dovecot/patches/001-configure_in.patch View File

1
+--- a/configure.ac
2
++++ b/configure.ac
3
+@@ -504,9 +504,9 @@ have_ioloop=no
4
+ 
5
+ if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
6
+   AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
7
+-    AC_TRY_RUN([
8
++    AC_TRY_LINK([
9
+       #include <sys/epoll.h>
10
+-  
11
++    ], [
12
+       int main()
13
+       {
14
+ 	return epoll_create(5) < 1;
15
+@@ -675,7 +675,7 @@ fi
16
+ dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
17
+ dnl * It may also be broken in AIX.
18
+ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
19
+-  AC_TRY_RUN([
20
++  AC_TRY_LINK([
21
+     #define _XOPEN_SOURCE 600
22
+     #include <stdio.h>
23
+     #include <stdlib.h>
24
+@@ -684,6 +684,7 @@ AC_CACHE_CHECK([whether posix_fallocate(
25
+     #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
26
+       possibly broken posix_fallocate
27
+     #endif
28
++  ], [
29
+     int main() {
30
+       int fd = creat("conftest.temp", 0600);
31
+       int ret;