diff --git a/sensible-utils.spec b/sensible-utils.spec new file mode 100644 index 0000000..6c43db3 --- /dev/null +++ b/sensible-utils.spec @@ -0,0 +1,54 @@ +Name: sensible-utils +Version: 0.0.21 +Release: 1 +Summary: Utilities for sensible alternative selection + +BuildArch: noarch +License: GPL-2.0-or-later +URL: https://salsa.debian.org/debian/sensible-utils +Source0: http://ftp.de.debian.org/debian/pool/main/s/%{name}/%{name}_%{version}.tar.xz + +BuildRequires: automake autoconf +BuildRequires: make +BuildRequires: po4a + +# See Patch0 +Requires: /usr/bin/gettext +Requires: /usr/bin/realpath + +# Just require gettext, realpath instead of installing wrappers +Patch0: sensible-utils_nowrappers.patch + +%description +This package provides a number of small utilities which are used by programs to +sensibly select and spawn an appropriate browser, editor, or pager. + + +%prep +%autosetup -p1 -n %{name} + + +%build +# Needed for Patch0 +autoreconf -ifv + +%configure +%make_build + + +%install +%make_install + + +%files +%license debian/copyright +%doc debian/changelog +%{_bindir}/sensible-* +%{_bindir}/select-editor +%{_mandir}/man1/*.1* +%{_mandir}/*/man1/*.1* + + +%changelog +* Wed Jan 24 2024 Dongxing Wang - 0.0.21-1 +- Initial package diff --git a/sensible-utils_0.0.21.tar.xz b/sensible-utils_0.0.21.tar.xz new file mode 100644 index 0000000..32d55c4 Binary files /dev/null and b/sensible-utils_0.0.21.tar.xz differ diff --git a/sensible-utils_nowrappers.patch b/sensible-utils_nowrappers.patch new file mode 100644 index 0000000..d103ca6 --- /dev/null +++ b/sensible-utils_nowrappers.patch @@ -0,0 +1,17 @@ +diff -rupN --no-dereference sensible-utils/Makefile.am sensible-utils-new/Makefile.am +--- sensible-utils/Makefile.am 2023-07-05 01:15:15.000000000 +0200 ++++ sensible-utils-new/Makefile.am 2023-07-06 13:02:49.777973601 +0200 +@@ -7,8 +7,6 @@ TESTS = test/ed-as-sensible-editor test/ + AM_TESTS_ENVIRONMENT=\ + PATH="$(top_srcdir):$$PATH"; export PATH; + +-binpkgdatadir = $(pkgdatadir)/bin +- + edit = sed \ + -e 's|@binpkgdatadir[@]|$(binpkgdatadir)|g' \ + -e 's|@prefix[@]|$(prefix)|g' +@@ -62,4 +60,3 @@ sensible-terminal: $(srcdir)/sensible-te + + + bin_SCRIPTS = sensible-browser sensible-editor sensible-pager select-editor sensible-terminal +-binpkgdata_SCRIPTS = tools/gettext tools/realpath