You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.5 KiB
Plaintext

%define debug_package %{nil}
%define _build_id_links none
%define _disable_source_fetch 0
%define component_name ps4-pkg-installer
Name: %{component_name}
Version: 1.0.0
Release: alt1
License: GPLv3
Summary: PS4 PKG Installer is a user friendly interface to upload pkg on your PS4
Group: Games/Emulators
Packager: Vadim Morozov <vadim@morozoff.pro>
Requires: node npm
Source0: https://github.com/derrix/ps4-pkg-installer/archive/refs/heads/master.zip
%description
PS4 PKG Installer is a user friendly interface to upload pkg on your PS4
%prep
%setup -qn ps4-pkg-installer-master
%build
%install
mkdir -p %{buildroot}/usr/share/ps4-pkg-installer
cp -R ./* %{buildroot}/usr/share/ps4-pkg-installer
%files
#%{buildroot}/usr/share/ps4-pkg-installer/
/*
%post
echo "Making magic"
npm install -g ---silent --prefix /usr/share/ps4-pkg-installer
echo "Creating systemd service for ps4-pkg-installer"
touch /lib/systemd/system/ps4-pkg-installer.service
echo -e "#!/bin/bash\nnpm start --prefix /usr/share/ps4-pkg-installer">/usr/bin/ps4-pkg-installer
chmod a+x /usr/bin/ps4-pkg-installer
echo -e "[Unit]\nPS4 Package Installer\n[Service]\nStartLimitInterval=5\nStartLimitBurst=10\nExecStart=/usr/bin/ps4-pkg-installer\n[Install]\nWantedBy=multi-user.target\n">/lib/systemd/system/ps4-pkg-installer.service
systemctl enable ps4-pkg-installer.service
systemctl daemon-reload
service ps4-pkg-installer start
%changelog
* Fri Jul 29 2022 Vadim Morozov <vadim@morozoff.pro>
- Initial build