-
-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.PHONY: clean test | ||
|
||
# Borrow files from .deb | ||
DEBDIR:=$(shell pwd)/../debian | ||
|
||
TOPDIR:=$(shell pwd)/../_build/rpm | ||
SCRIPTSRC:=$(DEBDIR)/ckan | ||
MANSRC:=$(DEBDIR)/ckan.1 | ||
DESKTOPSRC:=$(DEBDIR)/ckan.desktop | ||
ICONSRC:=$(DEBDIR)/ckan.ico | ||
EXESRC:=$(shell pwd)/../_build/repack/Release/ckan.exe | ||
CHANGELOGSRC:=../CHANGELOG.md | ||
VERSION:=$(shell egrep '^\s*\#\#\s+v.*$$' $(CHANGELOGSRC) | head -1 | sed -e 's/^\s*\#\#\s\+v//' ) | ||
RPM:=$(shell pwd)/../_build/rpm/RPMS/noarch/ckan-$(VERSION)-1.noarch.rpm | ||
|
||
# rpmbuild tries to use $HOME/rpmbuild by default | ||
# rpmbuild can't handle relative paths for its topdir | ||
# rpmbuild assumes we'll copy files into its SOURCES dir for it | ||
|
||
$(RPM): $(SCRIPTSRC) $(EXESRC) $(MANSRC) $(DESKTOPSRC) $(ICONSRC) | ||
mkdir -p "${TOPDIR}/SOURCES" | ||
cp $^ "${TOPDIR}/SOURCES" | ||
rpmbuild --define "_topdir ${TOPDIR}" --define "_version $(VERSION)" -bb ckan.spec | ||
|
||
clean: | ||
rm -r "$(TOPDIR)" | ||
|
||
test: $(RPM) | ||
rpm -qlp $< | ||
rpmlint $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Name: ckan | ||
Version: %{_version} | ||
Release: 1%{?dist} | ||
Summary: Mod manager for Kerbal Space Program | ||
URL: https://ksp-ckan.space | ||
Packager: The CKAN authors <rpm@ksp-ckan.space> | ||
License: MIT | ||
BuildArch: noarch | ||
Requires: mono | ||
Source0: ckan | ||
Source1: ckan.exe | ||
Source2: ckan.1 | ||
Source3: ckan.desktop | ||
Source4: ckan.ico | ||
|
||
%description | ||
KSP-CKAN official client. | ||
Official client for the Comprehensive Kerbal Archive Network (CKAN). | ||
Acts as a mod manager for Kerbal Space Program mods. | ||
|
||
%install | ||
umask 0022 | ||
mkdir -p %{buildroot}%{_bindir} | ||
cp %{SOURCE0} %{buildroot}%{_bindir} | ||
mkdir -p %{buildroot}/usr/lib/ckan | ||
cp %{SOURCE1} %{buildroot}/usr/lib/ckan | ||
mkdir -p %{buildroot}%{_mandir}/man1 | ||
cp %{SOURCE2} %{buildroot}%{_mandir}/man1 | ||
mkdir -p %{buildroot}%{_datadir}/applications | ||
cp %{SOURCE3} %{buildroot}%{_datadir}/applications | ||
mkdir -p %{buildroot}%{_datadir}/icons | ||
cp %{SOURCE4} %{buildroot}%{_datadir}/icons | ||
|
||
%files | ||
%{_bindir}/* | ||
/usr/lib/ckan | ||
%{_datadir}/applications/* | ||
%{_datadir}/icons/* | ||
%{_mandir}/man1/* | ||
|
||
%changelog | ||
* Thu May 9 2019 The CKAN authors <rpm@ksp-ckan.space> 1.26.3-1 | ||
- Initial RPM release |