Merge pull request #10178 from neheb/summo
[feed/packages.git] / mail / alpine / Makefile
1 #
2 # Copyright (C) 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:=alpine
11 PKG_VERSION:=2.21.9999
12 PKG_RELEASE:=2
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_SOURCE_URL:=http://repo.or.cz/alpine.git
17 PKG_SOURCE_VERSION:=d3e6f3932f2af9deca8eed09e30a55e9bd524362
18 PKG_MIRROR_HASH:=72f9e8c4c3ecbd5f73f527af98ad23f716fcede3af0ab0400c6e0bc9b1288e30
19
20 PKG_MAINTAINER:=Antti Seppälä <a.seppala@gmail.com>
21 PKG_LICENSE:=Apache-2.0
22 PKG_LICENSE_FILES:=LICENSE
23
24 PKG_FIXUP:=autoreconf
25
26 PKG_INSTALL:=1
27 PKG_BUILD_PARALLEL:=1
28
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/nls.mk
31
32 define Package/alpine/Default
33 SECTION:=mail
34 CATEGORY:=Mail
35 DEPENDS:=+libopenssl +libncurses +libpthread +libpam $(ICONV_DEPENDS) $(INTL_DEPENDS)
36 TITLE:=Alternatively Licensed Program for Internet News and Email
37 URL:=http://alpine.x10host.com/alpine/
38 endef
39
40 define Package/alpine/Default/description
41 Alpine (Alternatively Licensed Program for Internet News and Email) is a
42 free software email client developed at the University of Washington.
43 It is suitable for both the inexperienced email user as well as for
44 the most demanding power user.
45 endef
46
47 define Package/alpine
48 $(call Package/alpine/Default)
49 TITLE+= (with OpenSSL support)
50 DEPENDS+= +libopenssl
51 VARIANT:=ssl
52 endef
53
54 define Package/alpine/description
55 $(call Package/alpine/Default/description)
56 This package is built with OpenSSL support.
57 endef
58
59 define Package/alpine-nossl
60 $(call Package/alpine/Default)
61 TITLE+= (without OpenSSL support)
62 VARIANT:=nossl
63 endef
64
65 define Package/alpine-nossl/description
66 $(call Package/alpine/Default/description)
67 This package is built without OpenSSL support.
68 endef
69
70 CONFIGURE_ARGS += \
71 --with-libiconv-prefix=$(ICONV_PREFIX) \
72 --with-libintl-prefix=$(INTL_PREFIX) \
73 --without-tcl \
74 --without-ldap \
75 --without-krb5 \
76 --with-system-pinerc=/etc/pine.conf \
77 --with-system-fixed-pinerc=/etc/pine.conf.fixed \
78 --with-supplied-regex \
79 --with-default-sshpath=/usr/bin/ssh \
80 --disable-debug \
81 --disable-mouse \
82 --with-c-client-target=slx \
83
84 CONFIGURE_VARS += \
85 top_builddir=$(PKG_BUILD_DIR)
86
87 ifeq ($(BUILD_VARIANT),ssl)
88 CONFIGURE_ARGS += \
89 --with-ssl-include-dir=$(STAGING_DIR)/usr/include/openssl/. \
90 --with-ssl-lib-dir=$(STAGING_DIR)/usr/lib
91 endif
92
93 ifeq ($(BUILD_VARIANT),nossl)
94 CONFIGURE_ARGS += \
95 --without-ssl
96 endif
97
98 ifeq ($(CONFIG_BUILD_NLS),y)
99 DISABLE_NLS:=
100 endif
101
102 ifeq ($(CONFIG_IPV6),y)
103 DISABLE_IPV6:=
104 else
105 DISABLE_IPV6:=--without-ipv6
106 endif
107
108 define Build/Compile
109 ( cd $(PKG_BUILD_DIR)/pith ; \
110 $(HOSTCC) help_h_gen.c -c -o help_h_gen.o ; \
111 $(HOSTCC) help_h_gen.o -o help_h_gen ; \
112 $(HOSTCC) help_c_gen.c -c -o help_c_gen.o ; \
113 $(HOSTCC) help_c_gen.o -o help_c_gen ; \
114 )
115 $(call Build/Compile/Default)
116 endef
117
118 define Package/alpine/install
119 $(INSTALL_DIR) $(1)/usr/bin
120 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME)
121 endef
122
123 Package/alpine-nossl/install = $(Package/alpine/install)
124
125 $(eval $(call BuildPackage,alpine))
126 $(eval $(call BuildPackage,alpine-nossl))