[packages] Use default templates instead of custom reimplementations where applicable
[packages.git] / libs / libmcrypt / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libmcrypt
11 PKG_VERSION:=2.5.8
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/mcrypt
16 PKG_MD5SUM:=c4f491dd411a09e9de3b8702ea6f73eb
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 TARGET_CFLAGS += $(FPIC)
23
24 define Package/libmcrypt
25   SECTION:=libs
26   CATEGORY:=Libraries
27   TITLE:=Cryptographic library
28   URL:=http://mcrypt.sourceforge.net/
29 endef
30
31 define Package/libmcrypt/description
32         libmcrypt is a cryptographic library that conveniently brings
33         together a variety of ciphers for convenient use.
34 endef
35
36 define Build/Configure
37         $(call Build/Configure/Default, \
38                 --enable-shared \
39                 --enable-static \
40         )
41 endef
42
43 define Build/InstallDev
44         $(INSTALL_DIR) $(1)/usr/include
45         $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
46         $(INSTALL_DIR) $(1)/usr/lib
47         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmcrypt.{a,so*} $(1)/usr/lib/
48         $(INSTALL_DIR) $(1)/usr/bin
49         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libmcrypt-config $(1)/usr/bin/
50         $(SED) 's,-I$$$${prefix}/include,,g' $(1)/usr/bin/libmcrypt-config
51         $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/libmcrypt-config
52 endef
53
54 define Package/libmcrypt/install
55         $(INSTALL_DIR) $(1)/usr/lib
56         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmcrypt.so.* $(1)/usr/lib/
57 endef
58
59 $(eval $(call BuildPackage,libmcrypt))