2 # Copyright (C) 2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 PKG_HASH
:=b656f0e9a97a99c7531b6d49ebfd663451c16cdd275bbf7d48ff8daed3880bf2
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=https
://downloads.open-mesh.org
/batman
/releases
/batman-adv-
$(PKG_VERSION
)
19 include $(INCLUDE_DIR
)/package.mk
22 URL
:=https
://www.open-mesh.org
/
25 TITLE
:=A.L.F.R.E.D.
- Almighty Lightweight Fact Remote Exchange Daemon
26 DEPENDS
:= +libc @IPV6
+libnl-tiny
+librt \
27 +ALFRED_NEEDS_lua
:lua \
28 +ALFRED_NEEDS_libgps
:libgps
31 define Package
/alfred
/description
32 alfred is a user space daemon for distributing arbitrary local information over
33 the mesh
/network in a decentralized fashion. This data can be anything which
34 appears to be useful
- originally designed to replace the batman-adv
35 visualization
(vis
), you may distribute hostnames
, phone books
, administration
36 information
, DNS information
, the local weather forecast ...
38 alfred runs
as daemon in the background of the system. A user may insert
39 information by using the alfred binary on the command line
, or use special
40 programs to communicate with alfred
(done via unix sockets
). alfred then takes
41 care of distributing the local information to other alfred servers on other
42 nodes. This is done via IPv6 link-local multicast
, and does not require any
43 configuration. A user can request data from alfred
, and will receive the
44 information available from
all alfred servers in the network.
47 define Package
/alfred
/conffiles
51 define Package
/alfred
/config
52 source
"$(SOURCE)/Config.in"
56 CONFIG_ALFRED_VIS
=$(if
$(CONFIG_PACKAGE_ALFRED_VIS
),y
,n
) \
57 CONFIG_ALFRED_GPSD
=$(if
$(CONFIG_PACKAGE_ALFRED_GPSD
),y
,n
) \
58 CONFIG_ALFRED_CAPABILITIES
=n \
59 LIBNL_NAME
="libnl-tiny" \
60 LIBNL_GENL_NAME
="libnl-tiny" \
61 REVISION
="openwrt-$(PKG_VERSION)-$(PKG_RELEASE)"
63 TARGET_CFLAGS
+= -ffunction-sections
-fdata-sections
-flto
64 TARGET_LDFLAGS
+= -Wl
,--gc-sections
-fuse-linker-plugin
66 define Package
/alfred
/install
67 $(INSTALL_DIR
) $(1)/usr
/sbin
68 cp
-fpR
$(PKG_BUILD_DIR
)/alfred
$(1)/usr
/sbin
/
69 [ "x$(CONFIG_PACKAGE_ALFRED_VIS)" == "xy" ] && cp
-fpR
$(PKG_BUILD_DIR
)/vis
/batadv-vis
$(1)/usr
/sbin
/ ; true
70 [ "x$(CONFIG_PACKAGE_ALFRED_GPSD)" == "xy" ] && cp
-fpR
$(PKG_BUILD_DIR
)/gpsd
/alfred-gpsd
$(1)/usr
/sbin
/ ; true
71 $(INSTALL_DIR
) $(1)/etc
/init.d
72 $(INSTALL_BIN
) .
/files
/alfred.init
$(1)/etc
/init.d
/alfred
73 $(INSTALL_DIR
) $(1)/etc
/config
74 $(INSTALL_DATA
) .
/files
/alfred.config
$(1)/etc
/config
/alfred
75 $(INSTALL_DIR
) $(1)/etc
/alfred
76 [ "x$(CONFIG_PACKAGE_ALFRED_BATHOSTS)" == "xy" ] && $(INSTALL_BIN
) .
/files
/bat-hosts.lua
$(1)/etc
/alfred
/bat-hosts.lua
; true
79 $(eval
$(call BuildPackage
,alfred
))