1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
VILLASnode/packaging/rpm/Makefile.inc

72 lines
3.1 KiB
PHP
Raw Permalink Normal View History

2017-04-27 13:08:17 +02:00
# Makefile.
#
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
# @copyright 2017, Institute for Automation of Complex Power Systems, EONERC
# @license GNU General Public License (version 3)
#
# VILLASnode
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
###################################################################################
RPMDIR = $(BUILDDIR)/packaging/rpm
SPEC_VILLAS = $(BUILDDIR)/packaging/rpm/villas-node.spec
2017-04-02 00:17:18 +02:00
rpm: rpm-villas-node rpm-libwebsockets rpm-libxil
2017-04-02 00:17:18 +02:00
rpm-villas-node: $(TAR_VILLAS) $(SPEC_VILLAS) | $(RPMDIR)/SOURCES/
2017-04-27 09:33:53 +02:00
cp $(TAR_VILLAS) $(RPMDIR)/SOURCES
rpmbuild -ba --define="_topdir $$(pwd)/$(RPMDIR)" $(BUILDDIR)/packaging/rpm/villas-node.spec
2017-05-04 19:20:38 +02:00
rpm-libxil: $(BUILDDIR)/thirdparty/libxil/ | $(RPMDIR)/SOURCES/
cmake -DCMAKE_INSTALL_PREFIX:PATH=$(PREFIX) \
-H$(SRCDIR)/thirdparty/libxil \
-B$(BUILDDIR)/thirdparty/libxil $(CMAKE_OPTS)
make -C$(BUILDDIR)/thirdparty/libxil package_source
2017-05-04 19:20:38 +02:00
cp $(BUILDDIR)/thirdparty/libxil/libxil-*.tar.gz $(RPMDIR)/SOURCES/
rpmbuild -ba --define="_topdir $$(pwd)/$(RPMDIR)" $(SRCDIR)/thirdparty/libxil/libxil.spec
2017-05-23 14:54:25 +02:00
rpm-nanomsg: $(BUILDDIR)/thirdparty/nanomsg/ | $(RPMDIR)/SOURCES/
cmake -DCMAKE_INSTALL_PREFIX:PATH=$(PREFIX) \
-H$(SRCDIR)/thirdparty/nanomsg \
-B$(BUILDDIR)/thirdparty/nanomsg $(CMAKE_OPTS)
make -C$(BUILDDIR)/thirdparty/nanomsg package_source
cp $(BUILDDIR)/thirdparty/nanomsg/nanomsg-*.tar.gz $(RPMDIR)/SOURCES/
rpmbuild -ba --define="_topdir $$(pwd)/$(RPMDIR)" $(SRCDIR)/packaging/rpm/nanomsg.spec
2017-04-27 09:33:53 +02:00
rpm-libwebsockets: | $(RPMDIR)/RPMS/x86_64/ $(BUILDDIR)/thirdparty/libwebsockets/
cmake -DCMAKE_INSTALL_PREFIX:PATH=$(PREFIX) \
-H$(SRCDIR)/thirdparty/libwebsockets \
-B$(BUILDDIR)/thirdparty/libwebsockets $(CMAKE_OPTS)
make -C$(BUILDDIR)/thirdparty/libwebsockets libwebsockets_rpm
mv $(BUILDDIR)/thirdparty/libwebsockets/RPM/RPMS/x86_64/libwebsockets-*.rpm $(RPMDIR)/RPMS/x86_64/
# We patch version number and release fields of the spec file based on the current Git commit
$(SPEC_VILLAS): $(SRCDIR)/packaging/rpm/villas-node.spec | $$(dir $$@)
sed -e "s/§VERSION§/$(VERSION_NUM)/g" \
2017-04-07 17:48:40 +02:00
-e "s/§RELEASE§/1.$(GIT_BRANCH)_$(subst -,_,$(VARIANT)).$(shell date +%Y%m%d)git$(GIT_REV)/g" < $^ > $@
2017-06-13 15:13:54 +00:00
sign-rpm:
rpmsign $(RPMDIR)/RPMS/*/.rpm
2017-06-13 02:51:11 +02:00
deploy-rpm:
rsync -a --progress $(RPMDIR)/RPMS/ $(DEPLOY_USER)@$(DEPLOY_HOST):$(DEPLOY_PATH)/../packages/
ssh $(DEPLOY_USER)@$(DEPLOY_HOST) createrepo $(DEPLOY_PATH)/../packages
clean-rpm:
rm -rf $(RPMDIR)
2017-06-13 02:51:11 +02:00
.PHONY: rpm clean-rpm deploy-rpm sign-rpm rpm-libwebsockets rpm-libxil