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 | 145a2f5 | 2020-10-16 20:33:24 +0000 | [diff] [blame] | 5 | CLA_SYSREPO_DEPENDENCIES = sysrepo docopt-cpp spdlog systemd libgpiod boost cppcodec libev |
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 | 61670db | 2019-04-05 22:11:24 +0200 | [diff] [blame] | 9 | define CLA_SYSREPO_ONE_MODEL_INSTALL_1 |
Jan Kundrát | 2ccae18 | 2018-09-13 21:24:38 +0200 | [diff] [blame] | 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 |
Jan Kundrát | 61670db | 2019-04-05 22:11:24 +0200 | [diff] [blame] | 15 | endef |
| 16 | |
| 17 | define CLA_SYSREPO_ONE_MODEL_INSTALL_2 |
Jan Kundrát | 2ccae18 | 2018-09-13 21:24:38 +0200 | [diff] [blame] | 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 | |
Jan Kundrát | 61670db | 2019-04-05 22:11:24 +0200 | [diff] [blame] | 31 | define CLA_SYSREPO_ONE_MODEL_W_FEATURE |
| 32 | $(call CLA_SYSREPO_ONE_MODEL_INSTALL_1,$1,$2) |
| 33 | # FIXME: multiple features... |
| 34 | sed -i 's|__FEATURE__|ExecStart=/usr/bin/sysrepoctl --module $2 --feature-enable $3\n__FEATURE__|' \ |
| 35 | $(TARGET_DIR)/usr/lib/systemd/system/cla-install-yang-$1.service |
| 36 | $(call CLA_SYSREPO_ONE_MODEL_INSTALL_2,$1,$2) |
| 37 | endef |
| 38 | |
| 39 | define CLA_SYSREPO_ONE_MODEL |
| 40 | $(call CLA_SYSREPO_ONE_MODEL_INSTALL_1,$1,$2) |
| 41 | $(call CLA_SYSREPO_ONE_MODEL_INSTALL_2,$1,$2) |
| 42 | endef |
| 43 | |
Jan Kundrát | 2ccae18 | 2018-09-13 21:24:38 +0200 | [diff] [blame] | 44 | define CLA_SYSREPO_INSTALL_INIT_SYSTEMD |
Jan Kundrát | 61670db | 2019-04-05 22:11:24 +0200 | [diff] [blame] | 45 | $(call CLA_SYSREPO_ONE_MODEL_W_FEATURE,sdn-roadm-add-drop,czechlight-roadm-device,hw-add-drop-20) |
| 46 | $(call CLA_SYSREPO_ONE_MODEL_W_FEATURE,sdn-roadm-line,czechlight-roadm-device,hw-line-9) |
| 47 | $(call CLA_SYSREPO_ONE_MODEL,sdn-roadm-coherent-a-d,czechlight-coherent-add-drop) |
Jan Kundrát | 8677df6 | 2019-08-29 02:11:33 +0200 | [diff] [blame] | 48 | $(call CLA_SYSREPO_ONE_MODEL,sdn-inline,czechlight-inline-amp) |
Jan Kundrát | 58ac4ee | 2019-12-18 16:59:24 +0100 | [diff] [blame] | 49 | $(call CLA_SYSREPO_ONE_MODEL,calibration-box,czechlight-calibration-device) |
Jan Kundrát | 2ccae18 | 2018-09-13 21:24:38 +0200 | [diff] [blame] | 50 | endef |
| 51 | |
Jan Kundrát | 58ac4ee | 2019-12-18 16:59:24 +0100 | [diff] [blame] | 52 | # FIXME: calibration-box really needs a drop-in file with increased timeout... |
| 53 | |
Jan Kundrát | a67deea | 2017-03-21 20:21:07 +0100 | [diff] [blame] | 54 | $(eval $(cmake-package)) |