Jan Kundrát | a67deea | 2017-03-21 20:21:07 +0100 | [diff] [blame] | 1 | CLA_SYSREPO_VERSION = master |
| 2 | CLA_SYSREPO_SITE = ssh://kundrat@cesnet.cz@gerrit.cesnet.cz:29418/CzechLight/cla-sysrepo |
| 3 | CLA_SYSREPO_SITE_METHOD = git |
| 4 | CLA_SYSREPO_INSTALL_STAGING = NO |
Jan Kundrát | 082b76b | 2018-02-08 12:26:26 +0100 | [diff] [blame] | 5 | CLA_SYSREPO_DEPENDENCIES = sysrepo docopt-cpp spdlog netsnmp systemd libgpiod |
Jan Kundrát | a67deea | 2017-03-21 20:21:07 +0100 | [diff] [blame] | 6 | CLA_SYSREPO_CONF_OPTS = -DTHREADS_PTHREAD_ARG:STRING=-pthread |
| 7 | CLA_SYSREPO_LICENSE_FILES = LICENSE.md |
| 8 | |
Jan Kundrát | 2ccae18 | 2018-09-13 21:24:38 +0200 | [diff] [blame] | 9 | define 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/ |
| 29 | endef |
| 30 | |
| 31 | define 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) |
| 34 | endef |
| 35 | |
Jan Kundrát | a67deea | 2017-03-21 20:21:07 +0100 | [diff] [blame] | 36 | $(eval $(cmake-package)) |