Add Makefile and spec file
This is to build an srpm and for convenience. Options for make: all, clean, install, srpm
This commit is contained in:
parent
2f49b57064
commit
6f4a5a62ae
2 changed files with 48 additions and 0 deletions
21
Makefile
Normal file
21
Makefile
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
all:
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf dist/
|
||||||
|
rm -rf _install
|
||||||
|
|
||||||
|
install: all
|
||||||
|
mkdir -p /usr/share/cockpit
|
||||||
|
cp -r dist/ /usr/share/cockpit/subscription-manager
|
||||||
|
|
||||||
|
srpm: clean all
|
||||||
|
mkdir -p _install/usr/share/cockpit
|
||||||
|
cp -r dist/ _install/usr/share/cockpit/subscription-manager
|
||||||
|
mkdir -p _install/usr/share/metainfo/
|
||||||
|
cp *.metainfo.xml _install/usr/share/metainfo/
|
||||||
|
tar -C _install/ -czf subscription-manager-cockpit.tar.gz .
|
||||||
|
rpmbuild -bs \
|
||||||
|
--define "_sourcedir `pwd`" \
|
||||||
|
--define "_srcrpmdir `pwd`" \
|
||||||
|
subscription-manager-cockpit.spec
|
||||||
27
subscription-manager-cockpit.spec
Normal file
27
subscription-manager-cockpit.spec
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
Name: subscription-manager-cockpit
|
||||||
|
Version: 1
|
||||||
|
Release: 0
|
||||||
|
Summary: Subscription Manager Cockpit UI
|
||||||
|
License: LGPLv2.1+
|
||||||
|
|
||||||
|
Source: subscription-manager-cockpit.tar.gz
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
Requires: subscription-manager
|
||||||
|
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
%description
|
||||||
|
Subscription Manager Cockpit UI
|
||||||
|
|
||||||
|
%prep
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}
|
||||||
|
tar --strip-components=1 -xzf %{sources} -C %{buildroot}
|
||||||
|
find %{buildroot} -type f >> files.list
|
||||||
|
sed -i "s|%{buildroot}||" *.list
|
||||||
|
|
||||||
|
%files -f files.list
|
||||||
Loading…
Add table
Add a link
Reference in a new issue