mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
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>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user