pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/ufetch sysutils/ufetch: fix building on Linux.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f9559ade380d
branches:  trunk
changeset: 391484:f9559ade380d
user:      vins <vins%pkgsrc.org@localhost>
date:      Mon Jan 09 09:29:03 2023 +0000

description:
sysutils/ufetch: fix building on Linux.

Some distro identifiers had been renamed and others had been added,
breaking the package on Linux at install stage.

Simplify Makefile.

diffstat:

 sysutils/ufetch/Makefile    |  33 +++++++++++++--------------------
 sysutils/ufetch/PLIST.Linux |   8 +++++---
 2 files changed, 18 insertions(+), 23 deletions(-)

diffs (88 lines):

diff -r 85c347a639f2 -r f9559ade380d sysutils/ufetch/Makefile
--- a/sysutils/ufetch/Makefile  Mon Jan 09 09:19:27 2023 +0000
+++ b/sysutils/ufetch/Makefile  Mon Jan 09 09:29:03 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2022/12/19 09:32:36 pin Exp $
+# $NetBSD: Makefile,v 1.7 2023/01/09 09:29:03 vins Exp $
 
 DISTNAME=      ufetch-v0.3
 PKGNAME=       ${DISTNAME:S/-v/-/}
@@ -19,32 +19,25 @@
 
 .include "../../mk/bsd.prefs.mk"
 
-.if ${OPSYS} == "NetBSD"
-FLAVOR=        netbsd
-.elif ${OPSYS} == "OpenBSD"
-FLAVOR=        openbsd
-.elif ${OPSYS} == "FreeBSD"
-FLAVOR=        freebsd
-.elif ${OPSYS} == "Darwin"
+.if ${OPSYS:M*BSD} || ${OPSYS} == Linux
+FLAVOR=        ${LOWER_OPSYS}
+.elif ${OPSYS} == Darwin
 FLAVOR=        macos
-.elif ${OPSYS} == "Linux"
-FLAVOR=        linux
 .else
 BROKEN=        "Unsupported OS"
 .endif
 
 do-install:
-       ${RUN} cd ${WRKSRC} && \
-               ${INSTALL_SCRIPT} \
-                       ufetch-${FLAVOR} ${DESTDIR}${PREFIX}/bin/ufetch
+       ${INSTALL_SCRIPT} ${WRKSRC}/ufetch-${FLAVOR}    \
+               ${DESTDIR}${PREFIX}/bin/ufetch
 .if ${OPSYS} == "Linux"
-.  for f in alpine antergos arch archbang arco artix aux centos crux debian \
-          elementary fedora gentoo gnewsense guixsd hyperbola linuxlite mageia \
-          manjaro mint mx nixos parabola popos pureos raspbian slackware suse \
-          ubuntu void
-       ${RUN} cd ${WRKSRC} && \
-               ${INSTALL_SCRIPT} \
-                       ufetch-${f} ${DESTDIR}${PREFIX}/bin/ufetch-${f}
+.  for i in *bsd linux macos
+       ${RUN}${FIND} ${WRKSRC} -maxdepth 1 -type f     \
+               -name ufetch-${i} -delete
+.  endfor
+.  for f in ufetch-*
+       ${INSTALL_SCRIPT} ${WRKSRC}/${f}                \
+               ${DESTDIR}${PREFIX}/bin
 .  endfor
 .endif
 
diff -r 85c347a639f2 -r f9559ade380d sysutils/ufetch/PLIST.Linux
--- a/sysutils/ufetch/PLIST.Linux       Mon Jan 09 09:19:27 2023 +0000
+++ b/sysutils/ufetch/PLIST.Linux       Mon Jan 09 09:29:03 2023 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST.Linux,v 1.3 2019/12/31 11:16:49 ng0 Exp $
+@comment $NetBSD: PLIST.Linux,v 1.4 2023/01/09 09:29:03 vins Exp $
 bin/ufetch-alpine
 bin/ufetch-antergos
 bin/ufetch-arch
@@ -9,12 +9,14 @@
 bin/ufetch-centos
 bin/ufetch-crux
 bin/ufetch-debian
+bin/ufetch-devuan
 bin/ufetch-elementary
 bin/ufetch-fedora
 bin/ufetch-gentoo
 bin/ufetch-gnewsense
-bin/ufetch-guixsd
+bin/ufetch-guix
 bin/ufetch-hyperbola
+bin/ufetch-instantos
 bin/ufetch-linuxlite
 bin/ufetch-mageia
 bin/ufetch-manjaro
@@ -24,7 +26,7 @@
 bin/ufetch-parabola
 bin/ufetch-popos
 bin/ufetch-pureos
-bin/ufetch-raspbian
+bin/ufetch-raspberrypios
 bin/ufetch-slackware
 bin/ufetch-suse
 bin/ufetch-ubuntu



Home | Main Index | Thread Index | Old Index