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