1 # SPDX-License-Identifier: GPL-2.0-only
3 include $(TOPDIR
)/rules.mk
7 PKG_RELEASE
:=$(AUTORELEASE
)
9 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
10 PKG_SOURCE_URL
:=https
://downloads.open-mesh.org
/batman
/releases
/batman-adv-
$(PKG_VERSION
)
11 PKG_HASH
:=abba1dac61eccfcd6329e7331d0555fecc937760fb36c6cf55ce6c1d751cfd98
13 PKG_MAINTAINER
:=Simon Wunderlich
<sw@simonwunderlich.de
>
14 PKG_LICENSE
:=GPL-2.0
-only MIT
15 PKG_LICENSE_FILES
:=LICENSES
/preferred
/GPL-2.0 LICENSES
/preferred
/MIT
19 include $(INCLUDE_DIR
)/package.mk
24 TITLE
:=A.L.F.R.E.D.
- Almighty Lightweight Fact Remote Exchange Daemon
25 URL
:=https
://www.open-mesh.org
/
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
33 over the mesh
/network in a decentralized fashion. This data can be anything
34 which 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
="$(PKG_VERSION)-openwrt-$(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
))