source: packages/mail/dovecot/Makefile @ 21432

Last change on this file since 21432 was 21432, checked in by swalker, 6 years ago

[packages] dovecot: update to 1.2.11

  • Property copyright set to Copyright (C) 2006,2007 OpenWrt.org
  • Property licence set to GPLv2
File size: 2.9 KB
Line 
1#
2# Copyright (C) 2006-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=dovecot
11PKG_VERSION:=1.2.11
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://www.dovecot.org/releases/1.2
16PKG_MD5SUM:=bdac013fd57aa616ea4bdd9ac34557c6
17
18PKG_FIXUP:=libtool
19PKG_INSTALL:=1
20
21include $(INCLUDE_DIR)/package.mk
22
23define Package/dovecot
24  SECTION:=mail
25  CATEGORY:=Mail
26  DEPENDS:=+libopenssl +librt
27  TITLE:=An IMAP and POP3 daemon
28  URL:=http://www.dovecot.org/
29endef
30
31define Package/dovecot/description
32 Dovecot is a program which provides POP3 and IMAP services.
33endef
34
35CONFIGURE_ARGS += \
36        --without-gssapi \
37        --without-pam \
38        --with-moduledir=/usr/lib/dovecot/modules \
39        --with-notify=dnotify \
40
41CONFIGURE_VARS += \
42        RPCGEN= \
43        i_cv_signed_size_t=no \
44        i_cv_signed_time_t=no \
45        i_cv_gmtime_max_time_t=32 \
46        i_cv_mmap_plays_with_write=yes \
47        i_cv_fd_passing=yes \
48        i_cv_c99_vsnprintf=yes \
49        lib_cv_va_copy=yes \
50        lib_cv_va_copy=yes \
51        lib_cv___va_copy=yes \
52        lib_cv_va_val_copy=yes \
53
54define Build/Configure
55        (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
56                autoconf \
57        );
58        $(call Build/Configure/Default)
59endef
60
61define Package/dovecot/install
62        $(INSTALL_DIR) $(1)/etc/init.d
63        $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
64        $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/dovecot-example.conf $(1)/etc/dovecot.conf
65        $(INSTALL_DIR) $(1)/usr/lib/dovecot
66        $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
67        $(INSTALL_DIR) $(1)/usr/sbin
68        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
69        find $(1)/usr/lib/dovecot/modules/ \
70                -name "*.a" -o -name "*.la" | xargs rm
71endef
72
73define Package/dovecot/conffiles
74/etc/dovecot.conf
75endef
76
77define Package/dovecot/postinst
78#!/bin/sh
79
80id=59
81name=dovecot
82home=/var/run/dovecot
83shell=/bin/false
84
85# do not change below
86# check if we are on real system
87if [ -z "$${IPKG_INSTROOT}" ]; then
88        # create copies of passwd and group, if we use squashfs
89        rootfs=`mount |awk '/root/ { print $$5 }'`
90        if [ "$$rootfs" = "squashfs" ]; then
91                if [ -h /etc/group ]; then
92                        rm /etc/group
93                        cp -p /rom/etc/group /etc/group
94                fi
95                if [ -h /etc/passwd ]; then
96                        rm /etc/passwd
97                        cp -p /rom/etc/passwd /etc/passwd
98                fi
99        fi
100fi
101
102echo ""
103if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then
104        echo "adding group $$name to /etc/group"
105        echo "$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc/group
106fi
107if [ -z "$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then
108        echo "adding user $$name to /etc/passwd"
109        echo "$${name}:x:$${id}:$${id}:$${name}:$${home}:$${shell}" >> $${IPKG_INSTROOT}/etc/passwd
110fi
111endef
112
113
114$(eval $(call BuildPackage,dovecot))
Note: See TracBrowser for help on using the repository browser.