mirror of
https://github.com/ClusterCockpit/cc-metric-store.git
synced 2024-12-27 09:19:06 +01:00
Add Release action with RPMs and DEB packages
This commit is contained in:
parent
384c1fb6dd
commit
9fd2048e03
4
Makefile
4
Makefile
@ -27,7 +27,7 @@ install: $(APP)
|
|||||||
@if [ -z "$${WORKSPACE}" ]; then exit 1; fi
|
@if [ -z "$${WORKSPACE}" ]; then exit 1; fi
|
||||||
@mkdir --parents --verbose $${WORKSPACE}/usr/$(BINDIR)
|
@mkdir --parents --verbose $${WORKSPACE}/usr/$(BINDIR)
|
||||||
@install -Dpm 755 $(APP) $${WORKSPACE}/usr/$(BINDIR)/$(APP)
|
@install -Dpm 755 $(APP) $${WORKSPACE}/usr/$(BINDIR)/$(APP)
|
||||||
@install -Dpm 600 config.json $${WORKSPACE}/$(APP)/$(APP).conf
|
@install -Dpm 600 config.json $${WORKSPACE}/etc/$(APP)/$(APP).json
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
.ONESHELL:
|
.ONESHELL:
|
||||||
@ -104,7 +104,7 @@ DEB: scripts/cc-metric-store.deb.control $(APP)
|
|||||||
@SIZE="$$(awk -v size="$$SIZE_BYTES" 'BEGIN {print (size/1024)+1}' | awk '{print int($$0)}')"
|
@SIZE="$$(awk -v size="$$SIZE_BYTES" 'BEGIN {print (size/1024)+1}' | awk '{print int($$0)}')"
|
||||||
#@sed -e s+"{VERSION}"+"$$VERS"+g -e s+"{INSTALLED_SIZE}"+"$$SIZE"+g -e s+"{ARCH}"+"$$ARCH"+g $$CONTROLFILE > $${DEBIANDIR}/control
|
#@sed -e s+"{VERSION}"+"$$VERS"+g -e s+"{INSTALLED_SIZE}"+"$$SIZE"+g -e s+"{ARCH}"+"$$ARCH"+g $$CONTROLFILE > $${DEBIANDIR}/control
|
||||||
@sed -e s+"{VERSION}"+"$$VERS"+g -e s+"{INSTALLED_SIZE}"+"$$SIZE"+g -e s+"{ARCH}"+"$$ARCH"+g $$CONTROLFILE > $${DEBIANBINDIR}/control
|
@sed -e s+"{VERSION}"+"$$VERS"+g -e s+"{INSTALLED_SIZE}"+"$$SIZE"+g -e s+"{ARCH}"+"$$ARCH"+g $$CONTROLFILE > $${DEBIANBINDIR}/control
|
||||||
@make PREFIX=$${WORKSPACE} BINDIR="sbin" install
|
@make PREFIX=$${WORKSPACE} install
|
||||||
@DEB_FILE="cc-metric-store_$${VERS}_$${ARCH}.deb"
|
@DEB_FILE="cc-metric-store_$${VERS}_$${ARCH}.deb"
|
||||||
@dpkg-deb -b $${WORKSPACE} "$$DEB_FILE"
|
@dpkg-deb -b $${WORKSPACE} "$$DEB_FILE"
|
||||||
@rm -r "$${WORKSPACE}"
|
@rm -r "$${WORKSPACE}"
|
||||||
|
@ -26,7 +26,7 @@ make
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
# Install cc-metric-store
|
# Install cc-metric-store
|
||||||
make PREFIX=%{buildroot} BINDIR=sbin install
|
make PREFIX=%{buildroot} install
|
||||||
# Integrate into system
|
# Integrate into system
|
||||||
install -Dpm 0644 scripts/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
|
install -Dpm 0644 scripts/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
|
||||||
install -Dpm 0600 scripts/%{name}.config %{buildroot}%{_sysconfdir}/default/%{name}
|
install -Dpm 0600 scripts/%{name}.config %{buildroot}%{_sysconfdir}/default/%{name}
|
||||||
@ -47,7 +47,7 @@ install -Dpm 0644 scripts/%{name}.sysusers %{buildroot}%{_sysusersdir}/%{name}.c
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
# Binary
|
# Binary
|
||||||
%attr(-,clustercockpit,clustercockpit) %{_sbindir}/%{name}
|
%attr(-,clustercockpit,clustercockpit) %{_bindir}/%{name}
|
||||||
# Config
|
# Config
|
||||||
%dir %{_sysconfdir}/%{name}
|
%dir %{_sysconfdir}/%{name}
|
||||||
%attr(0600,clustercockpit,clustercockpit) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.json
|
%attr(0600,clustercockpit,clustercockpit) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.json
|
||||||
|
Loading…
Reference in New Issue
Block a user