blob: ddef562ccf2389bafd5633b033bcaa57162f6aa4 [file] [log] [blame]
Jan Kundráta67deea2017-03-21 20:21:07 +01001CLA_SYSREPO_VERSION = master
2CLA_SYSREPO_SITE = ssh://kundrat@cesnet.cz@gerrit.cesnet.cz:29418/CzechLight/cla-sysrepo
3CLA_SYSREPO_SITE_METHOD = git
4CLA_SYSREPO_INSTALL_STAGING = NO
Jan Kundrát082b76b2018-02-08 12:26:26 +01005CLA_SYSREPO_DEPENDENCIES = sysrepo docopt-cpp spdlog netsnmp systemd libgpiod
Jan Kundráta67deea2017-03-21 20:21:07 +01006CLA_SYSREPO_CONF_OPTS = -DTHREADS_PTHREAD_ARG:STRING=-pthread
7CLA_SYSREPO_LICENSE_FILES = LICENSE.md
8
Jan Kundrát2ccae182018-09-13 21:24:38 +02009define CLA_SYSREPO_ONE_MODEL
10 sed \
11 -e "s/__MODEL__/$1/g" \
12 -e "s/__YANG__/$2/g" \
13 $(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/cla-sysrepo/cla-install-yang.service.in \
14 > $(TARGET_DIR)/usr/lib/systemd/system/cla-install-yang-$1.service
15 # FIXME: zero or multiple features...
16 sed -i 's|__FEATURE__|ExecStart=/usr/bin/sysrepoctl --module $2 --feature-enable $3\n__FEATURE__|' \
17 $(TARGET_DIR)/usr/lib/systemd/system/cla-install-yang-$1.service
18 sed -i '/__FEATURE__/d' $(TARGET_DIR)/usr/lib/systemd/system/cla-install-yang-$1.service
19 sed \
20 -e "s/__MODEL__/$1/g" \
21 -e "s/__YANG__/$2/g" \
22 $(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/cla-sysrepo/cla-appliance.service.in \
23 > $(TARGET_DIR)/usr/lib/systemd/system/cla-$1.service
24 mkdir -p $(TARGET_DIR)/usr/lib/systemd/system/multi-user.target.wants
25 ln -sf ../cla-install-yang-$1.service \
26 $(TARGET_DIR)/usr/lib/systemd/system/multi-user.target.wants/
27 ln -sf ../cla-$1.service \
28 $(TARGET_DIR)/usr/lib/systemd/system/multi-user.target.wants/
29endef
30
31define CLA_SYSREPO_INSTALL_INIT_SYSTEMD
32 $(call CLA_SYSREPO_ONE_MODEL,sdn-roadm-add-drop,czechlight-roadm-device,hw-add-drop-20)
33 $(call CLA_SYSREPO_ONE_MODEL,sdn-roadm-line,czechlight-roadm-device,hw-line-9)
34endef
35
Jan Kundráta67deea2017-03-21 20:21:07 +010036$(eval $(cmake-package))