|
1 | 1 | include $(TOPDIR)/rules.mk |
2 | 2 |
|
3 | 3 | PROFILE_DESCRIPTION:=Generic metapackage for 8MB flash and/or 64MB RAM devices |
4 | | -PROFILE_DEPENDS:=+batctl-default \ |
| 4 | +PKG_NAME:=profile-antennine.org-outdoor-8-64 |
| 5 | +PKG_CONFLICTS:=\ |
| 6 | + -dnsmasq \ |
| 7 | + -odhcpd-ipv6only \ |
| 8 | + -opkg \ |
| 9 | + -ppp \ |
| 10 | + -ppp-mod-pppoe |
| 11 | +PROFILE_DEPENDS:=\ |
| 12 | + +batctl-default \ |
| 13 | + +babeld-auto-gw-mode \ |
5 | 14 | +check-date-http \ |
6 | 15 | +lime-debug \ |
7 | 16 | +lime-docs-minimal \ |
| 17 | + +lime-hwd-openwrt-wan \ |
8 | 18 | +lime-proto-anygw \ |
9 | 19 | +lime-proto-babeld \ |
10 | 20 | +lime-proto-batadv \ |
11 | 21 | +owut \ |
12 | | - +prometheus-node-exporter-lua \ |
13 | | - +prometheus-node-exporter-lua-openwrt \ |
14 | | - +prometheus-node-exporter-lua-wifi \ |
15 | | - +prometheus-node-exporter-lua-wifi_stations \ |
16 | 22 | +shared-state \ |
17 | 23 | +shared-state-babeld_hosts \ |
18 | 24 | +shared-state-nodes_and_links |
19 | 25 |
|
| 26 | +# hack to deselect openwrt's default_packages. To be used by at most by one metapackage/network-profile |
| 27 | +# warn: here TOPDIR is calculated by SDK, so it works with dockerized SDK and IB that use the same /builder |
| 28 | +define Package/$(PKG_NAME)/preinst |
| 29 | +#!/bin/sh |
| 30 | +[ -z "$${IPKG_INSTROOT}" ] && exit 0 |
| 31 | +echo "########################################################################## Inside package preinst" |
| 32 | +grep -q IB_MODIFIED_BY_$(PKG_NAME) $(TOPDIR)/Makefile && exit 0 |
| 33 | +echo "########################################################################## Determine make's target" |
| 34 | +R=$$(for cmd in $$(ls -l /proc/*/exe | grep make | sed 's|.*/proc/\(.*\)/exe.*|\1|' | tr '\n' ' ' | tr -d '\0' ) ; do cat "/proc/$${cmd}/cmdline"; done) |
| 35 | +make_target=$$(echo "$${R}" | grep -q manifest && echo 'manifest' || echo 'image') |
| 36 | +echo "make_target: $${make_target}" |
| 37 | +echo "########################################################################## Backup original Makefile" |
| 38 | +cp $(TOPDIR)/Makefile $(TOPDIR)/Makefile.orig |
| 39 | +echo "########################################################################## Terminate the execution after the second make image/manifest" |
| 40 | +cat << EOF > /tmp/hack_pkg_conflicts |
| 41 | + cp $(TOPDIR)/Makefile.orig $(TOPDIR)/Makefile |
| 42 | + kill $$(ls -l /proc/*/exe | grep make | sed 's|.*/proc/\(.*\)/exe.*|\1|' | tr '\n' ' ' ) |
| 43 | +EOF |
| 44 | +[ "$${make_target}" = "image" ] \ |
| 45 | + && sed -i '/^manifest:\ /e cat /tmp/hack_pkg_conflicts' $(TOPDIR)/Makefile \ |
| 46 | + || sed -i '/^package_whatdepends:\ /e cat /tmp/hack_pkg_conflicts' $(TOPDIR)/Makefile |
| 47 | +echo "########################################################################## Add PKG_CONFLICTS to be removed in the main Makefile" |
| 48 | +sed -i 's|\($$(USER_PACKAGES)\) \($$(BUILD_PACKAGES)\)|\1 $(PKG_CONFLICTS) \2|' $(TOPDIR)/Makefile |
| 49 | +echo "# IB_MODIFIED_BY_$(PKG_NAME)" >> $(TOPDIR)/Makefile |
| 50 | +echo "########################################################################## Re-run make image with the untouched MAKEFLAGS" |
| 51 | +make "$${make_target}" |
| 52 | +endef |
| 53 | + |
20 | 54 | include ../../profile.mk |
21 | 55 |
|
22 | 56 | # call BuildPackage - OpenWrt buildroot signature |
0 commit comments