blob: 00d8183a4f1eecdf35f1583201e4d4ef628638fc [file] [log] [blame]
Brad Bishop79641f22019-09-10 07:20:22 -04001SUMMARY = "lsb_release support for OpenEmbedded"
2SECTION = "console/utils"
Andrew Geissler6ce62a22020-11-30 19:58:47 -06003HOMEPAGE = "https://sourceforge.net/projects/lsb/files"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00004LICENSE = "GPL-2.0-or-later"
Brad Bishop79641f22019-09-10 07:20:22 -04005
6# lsb_release needs getopt
Patrick Williams213cb262021-08-07 19:21:33 -05007RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_getopt}"
Brad Bishop79641f22019-09-10 07:20:22 -04008
9LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
10
11SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \
12 file://0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050013 file://0001-Remove-timestamp-from-manpage.patch \
William A. Kennington IIIac69b482021-06-02 12:28:27 -070014 file://help2man-reproducibility.patch \
Brad Bishop79641f22019-09-10 07:20:22 -040015 "
16
Brad Bishop79641f22019-09-10 07:20:22 -040017SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
18
Patrick Williamsac13d5f2023-11-24 18:59:46 -060019UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/lsb/files/lsb_release/"
Brad Bishop79641f22019-09-10 07:20:22 -040020UPSTREAM_CHECK_REGEX = "/lsb_release/(?P<pver>(\d+[\.\-_]*)+)/"
21
22CLEANBROKEN = "1"
23
24do_install() {
25 oe_runmake install prefix=${D}${root_prefix} mandir=${D}${datadir}/man/ DESTDIR=${D}
26
27 mkdir -p ${D}${sysconfdir}/lsb-release.d
28
29 echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
30 echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release
31 if [ -n "${DISTRO_CODENAME}" ]; then
32 echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release
33 fi
34 echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release
35}
36
Patrick Williams213cb262021-08-07 19:21:33 -050037FILES:${PN} += "${base_libdir}"