aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Hieber <rhi@pengutronix.de>2020-12-12 21:29:57 +0100
committerKhem Raj <raj.khem@gmail.com>2020-12-13 22:05:00 -0800
commitb79ab49b3ee03c57f0b11bf419b09216e96d9058 (patch)
treefdcb9a3abefb0b26e7ba6b2c6eba7057800a48d1
parent2757d6d1f6e5834467697e571bde8fec564439a7 (diff)
downloadmeta-openembedded-contrib-b79ab49b3ee03c57f0b11bf419b09216e96d9058.tar.gz
meta-openembedded-contrib-b79ab49b3ee03c57f0b11bf419b09216e96d9058.tar.bz2
meta-openembedded-contrib-b79ab49b3ee03c57f0b11bf419b09216e96d9058.zip
openct: clean up do_install
* Use sysconfdir and nonarch_libdir instead of hard-coded paths, and be consistent with the slashes after ${D} * Install udev rules into /usr/lib/udev instead of /etc/udev so they can be overwritten in /etc, which has higher priority. Also use /usr/lib instead of /lib, latter of which isn't searched by udev [1]. * Don't create /usr/lib/udev, it is already created by install -D later with the default umask, which is fine * Make use of do_install[cleandirs] [1]: https://www.freedesktop.org/software/systemd/man/udev.html Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/openct/openct_0.6.20.bb24
1 files changed, 12 insertions, 12 deletions
diff --git a/meta-oe/recipes-support/openct/openct_0.6.20.bb b/meta-oe/recipes-support/openct/openct_0.6.20.bb
index f647786e2b..7ea0d4174f 100644
--- a/meta-oe/recipes-support/openct/openct_0.6.20.bb
+++ b/meta-oe/recipes-support/openct/openct_0.6.20.bb
@@ -35,7 +35,7 @@ EXTRA_OECONF=" \
--enable-pcsc \
--enable-doc \
--enable-api-doc \
- --with-udev=${nonarch_base_libdir}/udev \
+ --with-udev=${nonarch_libdir}/udev \
--with-bundle=${libdir}/pcsc/drivers \
"
@@ -43,7 +43,7 @@ inherit autotools pkgconfig
FILES_${PN} += " \
${libdir}/ctapi \
- ${nonarch_base_libdir}/udev \
+ ${nonarch_libdir}/udev \
${libdir}/openct-ifd.so \
${libdir}/pcsc \
"
@@ -55,10 +55,10 @@ FILES_${PN}-dbg += " \
INSANE_SKIP_${PN} += "dev-deps"
+do_install[cleandirs] += "${D}"
+
do_install () {
- rm -rf ${D}
- install -d ${D}/etc
- install -dm 755 ${D}${nonarch_base_libdir}/udev
+ install -d ${D}${sysconfdir}
# fix up hardcoded paths
sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir}/,' \
${WORKDIR}/openct.service ${WORKDIR}/openct.init
@@ -66,16 +66,16 @@ do_install () {
oe_runmake install DESTDIR=${D}
install -dm 755 ${D}${libdir}/ctapi/
mv ${D}${libdir}/libopenctapi.so ${D}${libdir}/ctapi/
- install -Dpm 644 etc/openct.udev ${D}/etc/udev/rules.d/60-openct.rules
- install -pm 644 etc/openct.conf ${D}/etc/openct.conf
+ install -Dpm 644 etc/openct.udev ${D}${nonarch_libdir}/udev/rules.d/60-openct.rules
+ install -pm 644 etc/openct.conf ${D}${sysconfdir}/openct.conf
- install -Dpm 755 ${WORKDIR}/openct.init ${D}/etc/init.d/openct
- install -Dpm 644 ${WORKDIR}/openct.sysconfig ${D}/etc/sysconfig/openct
+ install -Dpm 755 ${WORKDIR}/openct.init ${D}${sysconfdir}/init.d/openct
+ install -Dpm 644 ${WORKDIR}/openct.sysconfig ${D}${sysconfdir}/sysconfig/openct
- install -d ${D}/${systemd_unitdir}/system
- install -m 644 ${WORKDIR}/openct.service ${D}/${systemd_unitdir}/system
+ install -d ${D}${systemd_unitdir}/system
+ install -m 644 ${WORKDIR}/openct.service ${D}${systemd_unitdir}/system
so=$(find ${D} -name \*.so | sed "s|^${D}||")
sed -i -e 's|\\(LIBPATH\\s*\\).*|\\1$so|' etc/reader.conf
- install -Dpm 644 etc/reader.conf ${D}/etc/reader.conf.d/openct.conf
+ install -Dpm 644 etc/reader.conf ${D}${sysconfdir}/reader.conf.d/openct.conf
}