Skip to content
Snippets Groups Projects
Commit 20d6ca58 authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

add Debian packaging


Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent a41c6de4
Branches
No related tags found
No related merge requests found
......@@ -38,6 +38,24 @@ build/release-stamp:
@echo "Fixing version string..."
@sed -i "s/__version__ = .*/__version__ = '${VERSION}'/g" \
build/${PKGNAME}-${VERSION}/${NAME}/__init__.py
@echo "Generating debian changelog..."
@( \
version=${VERSION}; \
author=$$(git show HEAD --format="format:%an <%ae>" -s); \
date=$$(git show HEAD --format="format:%aD" -s); \
day=$$(git show HEAD --format='format:%ai' -s \
| awk '{print $$1}' \
| awk -F '-' '{print $$3}' | sed 's/^0/ /g'); \
date=$$(echo $${date} \
| awk '{print $$1, "'"$${day}"'", $$3, $$4, $$5, $$6}'); \
hash=$$(git show HEAD --format="format:%H" -s); \
echo "${PKGNAME} ($${version}) unstable; urgency=low"; \
echo; \
echo " * Generated from git commit $${hash}."; \
echo; \
echo " -- $${author} $${date}"; \
echo; \
) > build/${PKGNAME}-${VERSION}/debian/changelog
@find build/${PKGNAME}-${VERSION}/ -exec \
touch -t $$(date -d @$$(git show -s --format="format:%at") \
+"%Y%m%d%H%M.%S") {} \;
......@@ -50,3 +68,13 @@ build/release-stamp:
@echo "Generated release tarball:"
@echo " $$(ls dist/${PKGNAME}-${VERSION}.tar.gz)"
@touch build/release-stamp
deb: release build/deb-stamp
build/deb-stamp:
@echo "Building debian packages..."
@cd build/${PKGNAME}-${VERSION}; \
dpkg-buildpackage -rfakeroot -us -uc
@mv build/*_${VERSION}_*.deb dist/
@echo "Generated debian packages:"
@for pkg in $$(ls dist/*_${VERSION}_*.deb); do echo " $${pkg}"; done
@touch build/deb-stamp
9
Source: nvmetcli
Section: python
Priority: optional
Maintainer: Christoph Hellwig <hch@lst.de>
Build-Depends: debhelper(>= 8), python, python-setuptools, dh-python
Standards-Version: 3.9.4
Package: nvmetcli
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}, python-configshell-fb, python-kmodpy
Description: Command line interface for the kernel NVMe target
This package contains the command line interface to the NVMe over Fabrics
target in the Linux kernel. It allows configuring the target interactively
as well as saving / restoring the configuration to / from a json file.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: nvmetcli
Files: *
Copyright (c) 2011-2013 by Datera, Inc.
Copyright (c) 2011-2014 by Red Hat, Inc.
Copyright (c) 2016 by HGST, a Western Digital Company.
License: Apache-2.0
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.
The full text of the license can be found in
'/usr/share/common-licenses/Apache-2.0'.
/etc/nvmet
README
nvmetcli /usr/sbin
loop.json
rdma.json
2.7-
#!/usr/bin/make -f
build_dir = build
install_dir = $(CURDIR)/debian/nvmetcli
# prevent internet access / don't use PyPi
export http_proxy = http://127.0.0.1:9
%:
dh $@ --with python2
override_dh_auto_build:
python setup.py build
override_dh_auto_install:
python setup.py install --root=$(install_dir) --install-layout=deb
override_dh_auto_clean:
dh_auto_clean
rm -rf build
rm -rf *.egg-info
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment