Rename phosphor-fan-presence
A number of fan related applications are hosted by a single git
repository. Rename the recipe from phosphor-fan-presence to
phosphor-fan to cut down on confusion.
Change-Id: Ie9cdabb96d070c2f3666ff83c7ca37b0f152a2b3
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/classes/phosphor-fan-presence.bbclass b/classes/phosphor-fan.bbclass
similarity index 100%
rename from classes/phosphor-fan-presence.bbclass
rename to classes/phosphor-fan.bbclass
diff --git a/common/recipes-phosphor/fans/phosphor-fan-presence-example-native.bb b/common/recipes-phosphor/fans/phosphor-fan-presence-example-native.bb
index c97865e..02e6816 100644
--- a/common/recipes-phosphor/fans/phosphor-fan-presence-example-native.bb
+++ b/common/recipes-phosphor/fans/phosphor-fan-presence-example-native.bb
@@ -1,11 +1,11 @@
SUMMARY = "Phosphor Fan Presence Detection example data"
PR = "r1"
-require phosphor-fan-presence.inc
+require phosphor-fan.inc
inherit native
inherit obmc-phosphor-license
-inherit phosphor-fan-presence
+inherit phosphor-fan
PROVIDES += "virtual/phosphor-fan-presence-config"
@@ -13,5 +13,5 @@
do_install() {
DEST=${D}${presence_datadir}
- install -D ${S}/example/fan-detect.yaml ${DEST}/config.yaml
+ install -D ${S}/presence/example/fan-detect.yaml ${DEST}/config.yaml
}
diff --git a/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb b/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb
index 267fc92..9d19847 100644
--- a/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb
+++ b/common/recipes-phosphor/fans/phosphor-fan-presence-mrw-native.bb
@@ -3,7 +3,7 @@
inherit native
inherit obmc-phosphor-license
-inherit phosphor-fan-presence
+inherit phosphor-fan
DEPENDS += " \
mrw-native \
diff --git a/common/recipes-phosphor/fans/phosphor-fan-presence.bb b/common/recipes-phosphor/fans/phosphor-fan-presence.bb
deleted file mode 100644
index 201849a..0000000
--- a/common/recipes-phosphor/fans/phosphor-fan-presence.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-SUMMARY = "Phosphor Fan Presence"
-DESCRIPTION = "Phosphor fan presence provides a set of fan presence \
-daemons to monitor fan presence changes by different methods of \
-presence detection."
-PR = "r1"
-
-require ${PN}.inc
-
-inherit autotools pkgconfig pythonnative
-inherit obmc-phosphor-systemd
-inherit phosphor-fan-presence
-
-DEPENDS += "autoconf-archive-native"
-DEPENDS += "python-pyyaml-native"
-DEPENDS += "python-mako-native"
-DEPENDS += "sdbusplus"
-DEPENDS += "phosphor-logging"
-DEPENDS += "virtual/phosphor-fan-presence-config"
-DEPENDS += "libevdev"
-
-FAN_PRESENCE_PACKAGES = " \
- ${PN}-tach \
-"
-PACKAGES_remove = "${PN}"
-PACKAGES += "${FAN_PRESENCE_PACKAGES} phosphor-chassis-cooling-type"
-
-# Remove when this package has content
-ALLOW_EMPTY_phosphor-chassis-cooling-type = "1"
-
-SYSTEMD_PACKAGES = "${FAN_PRESENCE_PACKAGES}"
-RDEPENDS_${PN}-dev = "${FAN_PRESENCE_PACKAGES} phosphor-chassis-cooling-type"
-
-RDEPENDS_${PN}-tach += "sdbusplus"
-
-RDEPENDS_phosphor-chassis-cooling-type += "libevdev"
-
-# Needed to install into the obmc-host-start target
-TMPL = "phosphor-fan-presence-tach@.service"
-INSTFMT = "phosphor-fan-presence-tach@{0}.service"
-TGTFMT = "obmc-host-start@{0}.target"
-FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}"
-
-FILES_${PN}-tach = "${sbindir}/phosphor-fan-presence-tach"
-SYSTEMD_SERVICE_${PN}-tach += "${TMPL}"
-SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OECONF = \
- "FAN_DETECT_YAML_FILE=${STAGING_DIR_NATIVE}${presence_datadir}/config.yaml"
diff --git a/common/recipes-phosphor/fans/phosphor-fan-presence.inc b/common/recipes-phosphor/fans/phosphor-fan-presence.inc
deleted file mode 100644
index e251c83..0000000
--- a/common/recipes-phosphor/fans/phosphor-fan-presence.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-HOMEPAGE = "https://github.com/openbmc/phosphor-fan-presence"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-SRC_URI += "git://github.com/openbmc/phosphor-fan-presence"
-SRCREV = "2b44a6c0b282cf50c563a175535c4c32f55a81dc"
diff --git a/common/recipes-phosphor/fans/phosphor-fan.bb b/common/recipes-phosphor/fans/phosphor-fan.bb
new file mode 100644
index 0000000..406dc6d
--- /dev/null
+++ b/common/recipes-phosphor/fans/phosphor-fan.bb
@@ -0,0 +1,64 @@
+SUMMARY = "Phosphor Fan"
+DESCRIPTION = "Phosphor fan provides a set of fan monitoring and \
+control applications."
+PR = "r1"
+
+require ${PN}.inc
+
+inherit autotools pkgconfig pythonnative
+inherit obmc-phosphor-systemd
+inherit phosphor-fan
+
+S = "${WORKDIR}/git"
+
+# Common build dependencies
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "python-pyyaml-native"
+DEPENDS += "python-mako-native"
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-logging"
+
+# Package configuration
+FAN_PACKAGES = " \
+ ${PN}-presence-tach \
+ ${PN}-control \
+ phosphor-chassis-cooling-type \
+"
+PACKAGES_remove = "${PN}"
+PACKAGES += "${FAN_PACKAGES}"
+PACKAGECONFIG ??= "presence control cooling-type"
+SYSTEMD_PACKAGES = "${FAN_PACKAGES}"
+RDEPENDS_${PN}-dev = "${FAN_PACKAGES}"
+RDEPENDS_${PN}-staticdev = "${FAN_PACKAGES}"
+
+# --------------------------------------
+# ${PN}-presence-tach specific configuration
+PACKAGECONFIG[presence] = " \
+ --enable-presence \
+ FAN_DETECT_YAML_FILE=${STAGING_DIR_NATIVE}${presence_datadir}/config.yaml, \
+ --disable-presence, \
+ virtual/phosphor-fan-presence-config \
+ , \
+"
+RDEPENDS_${PN}-presence-tach += "sdbusplus"
+
+# Needed to install into the obmc-host-start target
+TMPL = "phosphor-fan-presence-tach@.service"
+INSTFMT = "phosphor-fan-presence-tach@{0}.service"
+TGTFMT = "obmc-host-start@{0}.target"
+FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}"
+
+FILES_${PN}-presence-tach = "${sbindir}/phosphor-fan-presence-tach"
+SYSTEMD_SERVICE_${PN}-presence-tach += "${TMPL}"
+SYSTEMD_LINK_${PN}-presence-tach += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
+
+# --------------------------------------
+# ${PN}-control specific configuration
+PACKAGECONFIG[control] = "--enable-control,--disable-control,,"
+FILES_${PN}-control = "${sbindir}/phosphor-fan-control"
+
+# --------------------------------------
+# phosphor-chassis-cooling-type specific configuration
+PACKAGECONFIG[cooling-type] = "--enable-cooling-type,--disable-cooling-type,libevdev,"
+RDEPENDS_phosphor-chassis-cooling-type += "libevdev"
+FILES_phosphor-chassis-cooling-type = "${sbindir}/phosphor-cooling-type"
diff --git a/common/recipes-phosphor/fans/phosphor-fan.inc b/common/recipes-phosphor/fans/phosphor-fan.inc
new file mode 100644
index 0000000..06edd1f
--- /dev/null
+++ b/common/recipes-phosphor/fans/phosphor-fan.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/phosphor-fan-presence"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI += "git://github.com/bradbishop/phosphor-fan-presence"
+SRCREV = "b9f3361f3bd47400b2d94d5e471508aa6233cf42"
diff --git a/common/recipes-phosphor/fans/phosphor-fan-presence/phosphor-fan-presence-tach@.service b/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service
similarity index 100%
rename from common/recipes-phosphor/fans/phosphor-fan-presence/phosphor-fan-presence-tach@.service
rename to common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-presence-tach@.service