public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/byobu] epel10.2: spec cleanup and modernization
Date: Sat, 30 May 2026 19:34:20 GMT	[thread overview]
Message-ID: <178016966043.1.10047160585431760014.rpms-byobu-87dd2e8926ea@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/byobu
Branch : epel10.2
Commit : 87dd2e8926ea998407042ed7a1c4c6ebad70e61d
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date   : 2026-03-15T00:27:35+00:00
Stats  : +49/-54 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/byobu/c/87dd2e8926ea998407042ed7a1c4c6ebad70e61d?branch=epel10.2

Log:
spec cleanup and modernization

---
diff --git a/byobu.spec b/byobu.spec
index 1e4478b..4eaf6b6 100644
--- a/byobu.spec
+++ b/byobu.spec
@@ -1,43 +1,39 @@
-%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
-# define icons directories...
-%define _iconstheme    hicolor
-%define _iconsbasedir  %{_datadir}/icons/%{_iconstheme}
-%define _iconsscaldir  %{_iconsbasedir}/scalable/apps
+%global _iconstheme    hicolor
+%global _iconsbasedir  %{_datadir}/icons/%{_iconstheme}
+%global _iconsscaldir  %{_iconsbasedir}/scalable/apps
 
 Name:		byobu
 Version:	6.15
 Release:	%autorelease
 Summary:	Light-weight, configurable window manager built upon GNU screen
 
-# Automatically converted from old format: GPLv3 - review is highly recommended.
 License:	GPL-3.0-only
 URL:		https://github.com/dustinkirkland/byobu
-Source0:	https://github.com/dustinkirkland/byobu/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Source0:	%{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
 
 # Default windows examples
 Source1:	fedoracommon
 
 # prefer dnf when installed
 # sent upstream: https://code.launchpad.net/~sanjay-ankur/byobu/byobu/+merge/415959
-Patch:		0002-byobu-use-dnf.patch
+Patch0:		0002-byobu-use-dnf.patch
 
 # for F41+ where we have dnf5
-Patch:		0002-byobu-use-dnf5.patch
-Patch:		0001-byobu-autostart-with-fish-shell.patch
+Patch1:		0002-byobu-use-dnf5.patch
 
 BuildArch:	noarch
 BuildRequires:	automake
 BuildRequires:	desktop-file-utils
 BuildRequires:	make
-BuildRequires:	%{_bindir}/msgfmt
-BuildRequires:	python3
+BuildRequires:	gettext
+BuildRequires:	python3-devel
 Requires:	gettext-runtime
 Requires:	newt
 Requires:	python3-newt
 Requires:	screen
 Requires:	tmux
 
-%Description
+%description
 Byobu is a Japanese term for decorative, multi-panel screens that serve 
 as folding room dividers. As an open source project, Byobu is an 
 elegant enhancement of the otherwise functional, plain, 
@@ -48,27 +44,20 @@ such as toggle-able system status notifications.
 %prep
 %autosetup -N
 %if 0%{?fedora} >= 41
-%autopatch -p0 1
+%patch -P 1 -p0
 %else
-%autopatch -p0 0
+%patch -P 0 -p0
 %endif
 
 # remove swap file
-if [ -e "usr/bin/.byobu-status-print.swp" ]; then rm usr/bin/.byobu-status-print.swp
-fi
+rm -f usr/bin/.byobu-status-print.swp
 
 # fix path for lib directory in scripts
-for i in `find . -type f -exec grep -l {BYOBU_PREFIX}/lib/ {} \;`; do
-sed -i "s#{BYOBU_PREFIX}/lib/#{BYOBU_PREFIX}/libexec/#g" $i;
-done
-
-# fix path for lib directory #2
-for i in `find . -type f -exec grep -l BYOBU_PREFIX/lib {} \;`; do
-sed -i "s#BYOBU_PREFIX/lib/#BYOBU_PREFIX/libexec/#g" $i;
-done
+grep -rl '{BYOBU_PREFIX}/lib/' . | xargs sed -i "s#{BYOBU_PREFIX}/lib/#{BYOBU_PREFIX}/libexec/#g"
+grep -rl 'BYOBU_PREFIX/lib' . | xargs sed -i "s#BYOBU_PREFIX/lib/#BYOBU_PREFIX/libexec/#g"
 
 # fix path for correct directory in /usr/share
-sed -i "s#DOC = BYOBU_PREFIX + '/share/doc/' + PKG#DOC='%{_pkgdocdir}'#g" usr/lib/byobu/include/config.py.in
+sed -i "s#DOC = BYOBU_PREFIX + '/share/doc/' + PKG#DOC='%{_docdir}/%{name}'#g" usr/lib/byobu/include/config.py.in
 
 # set default fedora windows
 cp -p %{SOURCE1} usr/share/byobu/windows/common
@@ -80,21 +69,19 @@ sed -i "s#/lib/#/libexec/#g" usr/lib/byobu/include/Makefile.am
 
 %build
 export BYOBU_PYTHON=%{__python3}
-sh ./autogen.sh
+autoreconf -fiv
 %configure
 %make_build
 
 
 %install
 %make_install
-rm -rf %{buildroot}%{_sysconfdir}/profile.d
 
 # remove apport which is not available in fedora
-rm %{buildroot}/%{_libexecdir}/%{name}/apport
-
+rm %{buildroot}%{_libexecdir}/%{name}/apport
 sed -i 's#status\[\"apport\"\]=0##g' %{buildroot}%{_bindir}/byobu-config
-cp -p COPYING %{buildroot}%{_pkgdocdir}
 
+# install translations manually as the Makefile doesn't do it
 for po in po/*.po
 do
     lang=${po#po/}
@@ -103,46 +90,54 @@ do
     msgfmt ${po} -o %{buildroot}%{_datadir}/locale/${lang}/LC_MESSAGES/%{name}.mo
 done
 
-#use the old xterm .desktop style for while
+%find_lang %{name}
+
+# use the old xterm .desktop style for while
 cp -a usr/share/%{name}/desktop/%{name}.desktop.old usr/share/%{name}/desktop/%{name}.desktop
 desktop-file-install usr/share/%{name}/desktop/%{name}.desktop --dir %{buildroot}%{_datadir}/applications
 
 # remove vigpg
-rm %{buildroot}/usr/bin/vigpg
-rm %{buildroot}/usr/share/man/man1/vigpg.1
+rm %{buildroot}%{_bindir}/vigpg
+rm %{buildroot}%{_mandir}/man1/vigpg.1*
 
 # add icon into /usr/share/icons/hicolor/scalable/apps/ from /usr/share/byobu/pixmaps/byobu.svg
-mkdir -p %{buildroot}%{_iconsscaldir}
-cp -p usr/share/byobu/pixmaps/byobu.svg %{buildroot}%{_iconsscaldir}
+install -D -p -m 0644 usr/share/byobu/pixmaps/byobu.svg %{buildroot}%{_iconsscaldir}/%{name}.svg
 
+# fix shebangs
+%py3_shebang_fix %{buildroot}%{_bindir}/* %{buildroot}%{_libexecdir}/%{name}/*
 
-%find_lang %{name}
-%files -f %{name}.lang
+# install README.md manually to the doc dir
+install -d %{buildroot}%{_docdir}/%{name}
+cp -p README.md %{buildroot}%{_docdir}/%{name}/
 
-%dir %{_datadir}/%{name}
-%dir %{_libexecdir}/%{name}
-%dir %{_sysconfdir}/%{name}
-%dir %{_pkgdocdir}
-%{_iconsscaldir}/%{name}.svg
-%{_pkgdocdir}/*
+# remove empty profile.d
+rm -rf %{buildroot}%{_sysconfdir}/profile.d
+
+%check
+desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
+
+%files -f %{name}.lang
+%license COPYING
+%{_docdir}/%{name}/
 %{_bindir}/%{name}*
 %{_bindir}/col1
 %{_bindir}/ctail
 %{_bindir}/manifest
 %{_bindir}/purge-old-kernels
 %{_bindir}/wifi-status
+%{_datadir}/%{name}/
 %{_datadir}/applications/%{name}.desktop
-%{_datadir}/sounds/%{name}/%{name}.ogg
-%{_datadir}/%{name}/*
+%{_datadir}/sounds/%{name}/
 %{_datadir}/dbus-1/services/us.kirkland.terminals.byobu.service
-%{_mandir}/man1/%{name}*.1.gz
-%{_mandir}/man1/col1.1.gz
-%{_mandir}/man1/ctail.1.gz
-%{_mandir}/man1/manifest.1.gz
-%{_mandir}/man1/purge-old-kernels.1.gz
-%{_mandir}/man1/wifi-status.1.gz
-%{_libexecdir}/%{name}/*
-%config(noreplace) %{_sysconfdir}/%{name}/*
+%{_iconsscaldir}/%{name}.svg
+%{_mandir}/man1/%{name}*.1*
+%{_mandir}/man1/col1.1*
+%{_mandir}/man1/ctail.1*
+%{_mandir}/man1/manifest.1*
+%{_mandir}/man1/purge-old-kernels.1*
+%{_mandir}/man1/wifi-status.1*
+%{_libexecdir}/%{name}/
+%config(noreplace) %{_sysconfdir}/%{name}/
 
 %changelog
 %autochangelog

                 reply	other threads:[~2026-05-30 19:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178016966043.1.10047160585431760014.rpms-byobu-87dd2e8926ea@fedoraproject.org \
    --to=rosset.filipe@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox