Closed ChrTall closed 1 year ago
Have you checked the last item of Quick Instruction in README (the item is folded, so you need to unfold it)? PREFIX
is supposed to be specified instead of INSDIR
. INSDIR
overwrites the combination of DESTDIR
& PREFIX
. I haven't tried it, but could you try this?
%make_install PREFIX=/usr/local
Edit: The install prefix should be /usr/local
but not /usr/local/bin
. I have fixed it.
When I change to PREFIX it basically has no install targets at all. RPM is happy when I provide only %license and %doc. Normally it should complain about files that are not packaged but installed in the buildroot.
This is my current spec file:
#
# spec file for package blesh
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: blesh
Version: 0.3.3
Release: 0
Summary: A command line editor written in Bash which replaces GNU Readline
License: BSD-3-Clause
URL: https://github.com/akinomyoga/ble.sh
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz
BuildRequires: make
BuildRequires: gcc
Requires: bash
BuildArch: noarch
%description
Bash Line Editor (ble.sh) is a command line editor written in pure Bash which replaces the default GNU Readline.
%prep
%autosetup -n ble.sh-%{version}
%build
make %{?_smp_mflags}
%install
%make_install PREFIX=/usr/local
%files
%license LICENSE.md
%doc README.md
%changelog
Ah, OK. So you are using 0.3.3. 0.3.3 doesn't support it. Can you use 0.4.0-devel2
?
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz
This link doesn't work (for both 0.3.3 and 0.4.0-devel). This link is automatically generated by GitHub, but its content is incomplete. If you like to build ble.sh from the source, you need to clone the git repository.
Basically, you do not need to build it from source code but can just use the pre-built archive provided on top of the release page. The resulting ble.sh is purely a set of shell scripts, so it works in every environment (as you set BuildArch: noarch
).
BuildRequires: make BuildRequires: gcc
gcc
isn't needed to build ble.sh.
canvas.GraphemeClusterBreak.sh
, canvas.c2w.musl.sh
, canvas.c2w.sh
, and canvas.emoji.sh
). If you still would like to run these C++ programs to update the table in place, you also need to download the needed resources (about 80 files) from unicode.org
. Also, you might occasionally need to manually update the code of the caller side when a new Unicode standard is published. This means that if you just run these programs without adjusting the code at the shell side, it will break ble.sh.Ah okay, thank you for the information. I will try to package the bash files then instead.
I have added some descriptions in README. (To see it, search "Create a package of ble.sh" in README and open the item)
@ChrTall Have you solved your issue? Can I close the issue?
I am trying to package ble.sh as a rpm package, but when I specify
%make_install INSDIR=/usr/local/bin
during %install I get an permission error. Normally I just use %{configure} during build and it is not required to specify any directory during make_install. Can somebody point me to the right direction?