[#11] Add Debian packaging
- uses "make all" to download and build database - packages it to debian package to be placed in /var/lib/neofs/ir Using: ```make debpackage``` Signed-off-by: Dmitriy Zabolotskiy <d.zabolotskiy@yadro.com>
This commit is contained in:
parent
83270949e0
commit
bbb5840e03
8 changed files with 76 additions and 2 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
tmp/
|
tmp/
|
||||||
in/
|
in/
|
||||||
locode_db
|
locode_db
|
||||||
|
# debhelpers
|
||||||
|
**/.debhelper
|
||||||
|
|
21
Makefile
21
Makefile
|
@ -3,12 +3,18 @@
|
||||||
VERSION ?= "$(shell git describe --tags --match "v*" --dirty --always --abbrev=8 2>/dev/null || cat VERSION 2>/dev/null || echo "develop")"
|
VERSION ?= "$(shell git describe --tags --match "v*" --dirty --always --abbrev=8 2>/dev/null || cat VERSION 2>/dev/null || echo "develop")"
|
||||||
NEOFSCLI ?= neofs-cli
|
NEOFSCLI ?= neofs-cli
|
||||||
|
|
||||||
.PHONY: all clean version help unlocode
|
.PHONY: all clean version help unlocode debpackage
|
||||||
|
|
||||||
DIRS = in tmp
|
DIRS = in tmp
|
||||||
|
|
||||||
space := $(subst ,, )
|
space := $(subst ,, )
|
||||||
|
|
||||||
|
# .deb package versioning
|
||||||
|
OS_RELEASE = $(shell lsb_release -cs)
|
||||||
|
PKG_VERSION ?= $(shell echo $(VERSION) | sed "s/^v//" | \
|
||||||
|
sed -E "s/(.*)-(g[a-fA-F0-9]{6,8})(.*)/\1\3~\2/" | \
|
||||||
|
sed "s/-/~/")-${OS_RELEASE}
|
||||||
|
|
||||||
all: $(DIRS) locode_db
|
all: $(DIRS) locode_db
|
||||||
|
|
||||||
$(DIRS):
|
$(DIRS):
|
||||||
|
@ -56,3 +62,16 @@ clean:
|
||||||
rm -f in/*
|
rm -f in/*
|
||||||
rm -f tmp/*
|
rm -f tmp/*
|
||||||
rm -f locode_db
|
rm -f locode_db
|
||||||
|
|
||||||
|
# Package for Debian
|
||||||
|
debpackage:
|
||||||
|
dch --package neofs-locode-db \
|
||||||
|
--controlmaint \
|
||||||
|
--newversion $(PKG_VERSION) \
|
||||||
|
--force-bad-version \
|
||||||
|
--distribution $(OS_RELEASE) \
|
||||||
|
"Please see CHANGELOG.md for code changes for $(VERSION)"
|
||||||
|
dpkg-buildpackage --no-sign -b
|
||||||
|
|
||||||
|
debclean:
|
||||||
|
dh clean
|
||||||
|
|
6
debian/changelog
vendored
Normal file
6
debian/changelog
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
neofs-locode-db (0.2.1) stable; urgency=medium
|
||||||
|
|
||||||
|
* Initial change.
|
||||||
|
|
||||||
|
-- NeoSPCC <tech@nspcc.ru> Wed, 19 Oct 2022 12:33:04 +0300
|
||||||
|
|
17
debian/control
vendored
Normal file
17
debian/control
vendored
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
Source: neofs-locode-db
|
||||||
|
Section: misc
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: NeoSPCC <tech@nspcc.ru>
|
||||||
|
Build-Depends: debhelper-compat (= 13), git, devscripts, wget, neofs-cli
|
||||||
|
Standards-Version: 4.5.1
|
||||||
|
Homepage: https://fs.neo.org/
|
||||||
|
Vcs-Git: https://github.com/nspcc-dev/neofs-locode-db.git
|
||||||
|
Vcs-Browser: https://github.com/nspcc-dev/neofs-locode-db
|
||||||
|
|
||||||
|
Package: neofs-locode-db
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${misc:Depends}
|
||||||
|
Description: Compiled UN/LOCODE database for NeoFS
|
||||||
|
NeoFS uses UN/LOCODE in storage node attributes and storage policies.
|
||||||
|
Inner ring nodes converts UN/LOCODE into human-readable set of attributes
|
||||||
|
such as continent, country name, etc.
|
11
debian/copyright
vendored
Normal file
11
debian/copyright
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: neofs-locode-db
|
||||||
|
Upstream-Contact: tech@nspcc.ru
|
||||||
|
Source: https://github.com/nspcc-dev/neofs-locode-db
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: 2018-2022 NeoSPCC (@nspcc-dev)
|
||||||
|
|
||||||
|
License: CC-BY-SA-4.0
|
||||||
|
This project is licensed under the CC Attribution-ShareAlike 4.0 International
|
||||||
|
https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
1
debian/neofs-locode-db.install
vendored
Normal file
1
debian/neofs-locode-db.install
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
locode_db var/lib/neofs/ir
|
17
debian/rules
vendored
Executable file
17
debian/rules
vendored
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
export DEB_BUILD_OPTIONS := nostrip nocheck
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
override_dh_auto_build:
|
||||||
|
$(MAKE) all
|
||||||
|
|
||||||
|
override_dh_installchangelogs:
|
||||||
|
dh_installchangelogs -k CHANGELOG.md
|
||||||
|
|
||||||
|
override_dh_clean:
|
||||||
|
dh_clean
|
||||||
|
rm -f locode_db
|
||||||
|
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
3.0 (quilt)
|
Loading…
Reference in a new issue