File jpm.spec of Package jpm
#
# spec file for package jpm
#
# 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: jpm
Version: 1.1.0
Release: 0
Summary: Project manager for Janet
License: MIT
URL: https://janet-lang.org
Source0: https://github.com/janet-lang/jpm/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: janet
Requires: janet
%description
JPM is the Janet Project Manager tool. It is for automating builds
and downloading dependencies of Janet projects. This project is a
port of the original jpm tool (which started as a single file script)
to add more functionality, clean up code, make more portable and
configurable, and refactor jpm into independent, reusable pieces that
can be imported as normal Janet modules.
%prep
%setup -q
sed -i 's|/usr/bin/env janet|/usr/bin/janet|g' jpm/jpm
sed -i 's|/lib|/%{_lib}|g' configs/linux_config.janet
sed -i 's|/usr/local|%{_prefix}|g' configs/linux_config.janet
%build
%install
install -Dt "%{buildroot}%{_bindir}" jpm/jpm
install -Dm644 -t "%{buildroot}%{_libdir}/janet/jpm" jpm/*.janet
install -Dm644 -t "%{buildroot}%{_mandir}/man1" jpm.1
install -Dm644 -t "%{buildroot}%{_datadir}/janet/jpm/configs" configs/*
install -Dm644 configs/linux_config.janet "%{buildroot}%{_libdir}/janet/jpm/default-config.janet"
%files
%{_bindir}/jpm
%{_mandir}/man1/jpm.1%{?ext_man}
%dir %{_datadir}/janet
%dir %{_datadir}/janet/jpm
%dir %{_datadir}/janet/jpm/configs
%dir %{_libdir}/janet/jpm
%{_datadir}/janet/jpm/*
%{_libdir}/janet/jpm/*
%license LICENSE
%doc *.md
%changelog