packages/xmail: fix whitespaces
[packages.git] / utils / haveged / Makefile
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: Makefile 1 2012-01-12 03:50:18Z Olipro $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=haveged
12 PKG_VERSION:=1.7c
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.issihosts.com/$(PKG_NAME)
17 PKG_MD5SUM:=036760389b1827a2532e248dd3cc46d3
18
19 #ensure this is consistent with the dir in the tarball!!!
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 PKG_BUILD_PARALLEL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/haveged/template
27   SECTION:=utils
28   CATEGORY:=Utilities
29   TITLE:=Feeds the kernel entropy pool by timing CPU loops.
30   URL:=http://www.issihosts.com/haveged/
31 endef
32
33 define Package/haveged
34   $(call Package/haveged/template)
35   DEPENDS:=+libhavege
36 endef
37
38 define Package/libhavege
39   $(call Package/haveged/template)
40   TITLE:=Library for haveged
41 endef
42
43 CONFIGURE_ARGS+= \
44       --enable-daemon=yes
45       --enable-threads=no
46
47 define Build/InstallDev
48         $(INSTALL_DIR) $(1)/usr/include
49         $(CP) $(PKG_BUILD_DIR)/src/havege.h $(1)/usr/include/
50         $(INSTALL_DIR) $(1)/usr/lib
51         $(CP) $(PKG_BUILD_DIR)/src/.libs/libhavege.{a,so*} $(1)/usr/lib/
52 endef
53
54 define Package/haveged/install
55         $(INSTALL_DIR) $(1)/etc/init.d
56         $(INSTALL_BIN) ./files/haveged.init $(1)/etc/init.d/haveged
57         $(INSTALL_DIR) $(1)/usr/sbin
58         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/haveged $(1)/usr/sbin/
59 endef
60
61 define Package/libhavege/install
62         $(INSTALL_DIR) $(1)/usr/lib
63         $(CP) $(PKG_BUILD_DIR)/src/.libs/libhavege.so* $(1)/usr/lib/
64 endef
65
66 $(eval $(call BuildPackage,haveged))
67 $(eval $(call BuildPackage,libhavege))