Skip to content

Commit

Permalink
rpm: package storypointer to Fedora
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed Aug 13, 2024
1 parent 4408ac6 commit 6772b0e
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
/tsconfig.*
/test

nodejs-storypointer.spec

*.tsbuildinfo
.*
26 changes: 26 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Inspired by https://github.com/csutils/csmock/blob/main/.packit.yaml
# See the documentation for more information:
# https://packit.dev/docs/configuration/

specfile_path: rpm/nodejs-storypointer.spec

# add or remove files that should be synced
files_to_sync:
- rpm/nodejs-storypointer.spec
- .packit.yaml

upstream_package_name: storypointer
downstream_package_name: nodejs-storypointer

jobs:
- &copr
job: copr_build
trigger: pull_request
targets:
- fedora-all-x86_64

- <<: *copr
trigger: release
owner: "jamacku"
project: "nodejs-storypointer"
branch: main
53 changes: 53 additions & 0 deletions rpm/nodejs-storypointer.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# https://src.fedoraproject.org/rpms/nodejs-packaging
%global npm_name storypointer

Name: nodejs-%{npm_name}
Version: 1.1.0
Release: %autorelease
Summary: Simple CLI tool to set JIRA Story Points and Priority

License: GPL-3.0-or-later
URL: https://github.com/redhat-plumbers-in-action/storypointer
Source: https://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz

BuildRequires: nodejs-devel
BuildRequires: yarnpkg

%global _description %{expand:
Simple CLI tool that provides an interactive interface to quickly set priority and story points for your JIRA issues.}

%description %{_description}

%package -n %{npm_name}
Summary: %{summary}
License: 0BSD AND BSD-2-Clause AND GPL-3.0-or-later AND ISC AND MIT AND (MIT OR CC0-1.0)

%description -n %{npm_name} %{_description}

%files
%doc README.md
%license LICENSE %{npm_name}-bundled-licenses.txt
%{nodejs_sitelib}/%{npm_name}
%{_bindir}/%{npm_name}

%prep
%setup -q -n package
mv rpm/%{npm_name}-bundled-licenses.txt .

%build
yarn install
yarn build

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}/bin
install -p -D -m0755 dist/main.js %{buildroot}%{nodejs_sitelib}/%{npm_name}/bin/%{npm_name}
mkdir -p %{buildroot}%{_bindir}
ln -sf %{nodejs_sitelib}/%{npm_name}/bin/%{npm_name} %{buildroot}%{_bindir}/%{npm_name}

%if %{with check}
%check
yarn test
%endif

%changelog
%autochangelog
6 changes: 6 additions & 0 deletions rpm/storypointer-bundled-licenses.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"0BSD"
"BSD-2-Clause"
"GPL-3.0+"
"ISC"
"MIT"
"(MIT OR CC0-1.0)"

0 comments on commit 6772b0e

Please sign in to comment.