Added deb packaging scripts
This commit is contained in:
69
packaging/Makefile
Normal file
69
packaging/Makefile
Normal file
@@ -0,0 +1,69 @@
|
||||
# Makefile
|
||||
#
|
||||
# Copyright (c) 2021-2022 Bartek Kryza <bkryza@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
SHELL := /bin/bash
|
||||
.ONESHELL:
|
||||
|
||||
.PHONY: download deb clean
|
||||
|
||||
NAME ?= clang-uml
|
||||
REBUILD ?= 1
|
||||
MAINTAINER_NAME ?= Bartek Kryza
|
||||
MAINTAINER_EMAIL ?= bkryza@gmail.com
|
||||
GPG_KEY ?= 702014E322FE5CA9B5D920F66CDA4566635E93B1
|
||||
OS ?= ubuntu
|
||||
DIST ?= focal
|
||||
TAR_EXT ?= gz
|
||||
|
||||
build_dir = _BUILD/$(NAME)/$(OS)/$(DIST)
|
||||
|
||||
VERSION ?= $(shell git describe --tags --always --abbrev=7)
|
||||
|
||||
#
|
||||
# Replace mustache template variable in all files in directory recursively,
|
||||
# e.g.:
|
||||
# $(call subst_template,VERSION,${VERSION},debian)
|
||||
#
|
||||
define subst_template_dir
|
||||
find $(3) -type f -exec sed -i "s/{{$(1)}}/$(2)/g" {} \;
|
||||
endef
|
||||
|
||||
|
||||
deb:
|
||||
rm -rf $(build_dir)
|
||||
mkdir -p $(build_dir)
|
||||
git-archive-all --prefix=clang-uml-$(VERSION)/ $(build_dir)/clang-uml-$(VERSION).tar.$(TAR_EXT)
|
||||
cd $(build_dir)
|
||||
echo "Creating archive from current source"
|
||||
echo "Creating directory: ", $(NAME)-$(VERSION)
|
||||
mkdir $(NAME)-$(VERSION)
|
||||
echo "Extracting source archive..."
|
||||
tar xf $(NAME)-$(VERSION).tar.$(TAR_EXT) -C $(NAME)-$(VERSION) --strip-components 1
|
||||
cp -R ../../../../debian $(NAME)-$(VERSION)/debian
|
||||
cd $(NAME)-$(VERSION)
|
||||
$(call subst_template_dir,DATETIME,$(shell date -R),debian)
|
||||
$(call subst_template_dir,OS,${OS},debian)
|
||||
$(call subst_template_dir,NAME,${NAME},debian)
|
||||
$(call subst_template_dir,VERSION,${VERSION},debian)
|
||||
$(call subst_template_dir,REBUILD,${REBUILD},debian)
|
||||
$(call subst_template_dir,DISTRIBUTION,${DIST},debian)
|
||||
$(call subst_template_dir,MAINTAINER_NAME,${MAINTAINER_NAME},debian)
|
||||
$(call subst_template_dir,MAINTAINER_EMAIL,${MAINTAINER_EMAIL},debian)
|
||||
mk-origtargz ../$(NAME)-$(VERSION).tar.$(TAR_EXT)
|
||||
# BUILD SOURCE PACKAGE FOR LAUNCHPAD
|
||||
debuild -S -sa -us -d -k$(GPG_KEY) #--source-option=--include-binaries --source-option=--include-removal --source-option=-isession
|
||||
# BUILD LOCALLY BINARY PACKAGE
|
||||
#debuild -us -uc #--source-option=--include-binaries --source-option=--include-removal --source-option=-isession
|
||||
5
packaging/debian/changelog
Normal file
5
packaging/debian/changelog
Normal file
@@ -0,0 +1,5 @@
|
||||
clang-uml ({{VERSION}}-0{{OS}}{{REBUILD}}~{{DISTRIBUTION}}) {{DISTRIBUTION}}; urgency=low
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Bartek Kryza <bkryza@gmail.com> {{DATETIME}}
|
||||
1
packaging/debian/compat
Normal file
1
packaging/debian/compat
Normal file
@@ -0,0 +1 @@
|
||||
10
|
||||
19
packaging/debian/control
Normal file
19
packaging/debian/control
Normal file
@@ -0,0 +1,19 @@
|
||||
Source: clang-uml
|
||||
Maintainer: Bartek Kryza <bkryza@gmail.com>
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Build-Depends: debhelper, make, gcc, g++, cmake, libyaml-cpp-dev, clang, libclang-dev, libclang-cpp-dev
|
||||
Standards-Version: 4.3.0
|
||||
Vcs-Browser: https://github.com/bkryza/clang-uml
|
||||
Vcs-Git: https://github.com/bkryza/clang-uml.git
|
||||
Homepage: https://github.com/bkryza/clang-uml
|
||||
|
||||
Package: clang-uml
|
||||
Architecture: any
|
||||
#Multi-Arch: same
|
||||
Section: libs
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Description: Automatic C++ UML diagram generator based on Clang.
|
||||
.
|
||||
This package provides the clang-uml binary.
|
||||
16
packaging/debian/copyright
Normal file
16
packaging/debian/copyright
Normal file
@@ -0,0 +1,16 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: clang-uml
|
||||
Source: https://github.com/bkryza/clang-uml
|
||||
|
||||
Files: *
|
||||
Copyright: 2021-2022 Bartek Kryza <bkryza@gmail.com>
|
||||
License: apache
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
12
packaging/debian/rules
Executable file
12
packaging/debian/rules
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
export DH_VERBOSE=1
|
||||
export CLANGUML_GIT_TOPLEVEL_DIR=$(CURDIR)
|
||||
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure --buildsystem=cmake -- -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/usr
|
||||
|
||||
|
||||
%:
|
||||
dh $@
|
||||
1
packaging/debian/source/format
Normal file
1
packaging/debian/source/format
Normal file
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
3
packaging/debian/watch
Normal file
3
packaging/debian/watch
Normal file
@@ -0,0 +1,3 @@
|
||||
version=4
|
||||
|
||||
https://github.com/bkryza/clang-uml/releases .*/[relasymcp.-]*(\d\S*)\.tar\.gz
|
||||
Reference in New Issue
Block a user