Add package generator script

- add a 'pckgen' script to generate various OpenCAS packages like
release archives (tar, zip), RPMs (source and binary) as well as to
create version file with metadata
- add a SPEC file for RPM creation
- add Makefile targets to use 'pckgen' script through 'make <package>'

'pckgen' script has a bunch of features for package generation.
Read './pckgen --help' for more information on usage scenarios.

Script is also prepared to easily add new packages creation in the future.

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
This commit is contained in:
Rafal Stefanowski
2020-03-03 16:21:31 +01:00
parent 09c585bbcd
commit 7335b321ea
4 changed files with 640 additions and 14 deletions

View File

@@ -3,6 +3,8 @@
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
PWD:=$(shell pwd)
default: all
DIRS:=modules casadm utils
@@ -12,4 +14,19 @@ DIRS:=modules casadm utils
all $(MAKECMDGOALS): $(DIRS)
$(DIRS):
ifneq ($(MAKECMDGOALS),archives)
ifneq ($(MAKECMDGOALS),rpm)
ifneq ($(MAKECMDGOALS),srpm)
cd $@ && $(MAKE) $(MAKECMDGOALS)
endif
endif
endif
archives:
@utils/pckgen $(PWD) tar zip
rpm:
@utils/pckgen $(PWD) rpm
srpm:
@utils/pckgen $(PWD) srpm