Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debian package build #6

Merged
merged 12 commits into from Sep 21, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions packaging/build_deb
@@ -0,0 +1,25 @@
#!/bin/bash -xe
kumagi marked this conversation as resolved.
Show resolved Hide resolved
# Execute this shell-script at root directory of libsxg project.
kumagi marked this conversation as resolved.
Show resolved Hide resolved

SRCDIR=$(pwd)
kumagi marked this conversation as resolved.
Show resolved Hide resolved
WORKDIR=$(mktemp -d)
kumagi marked this conversation as resolved.
Show resolved Hide resolved
kumagi marked this conversation as resolved.
Show resolved Hide resolved

NAME="libsxg"
kumagi marked this conversation as resolved.
Show resolved Hide resolved
kumagi marked this conversation as resolved.
Show resolved Hide resolved
VERSION="0.1"
TARNAME="${NAME}-${VERSION}"
TARGET_NAME="libsxg-dev"
ARCHITECTURE=$(dpkg --print-architecture)

echo "Working in ${WORKDIR}"
kumagi marked this conversation as resolved.
Show resolved Hide resolved
git archive --format=tar.gz --output="${TARNAME}.tar.gz" -v HEAD \
kumagi marked this conversation as resolved.
Show resolved Hide resolved
--prefix="${TARNAME}/" 2> /dev/null
mv "${TARNAME}.tar.gz" "${WORKDIR}"
pushd "${WORKDIR}"
tar xf "${TARNAME}.tar.gz"
cp "${TARNAME}.tar.gz" "${NAME}_${VERSION}.orig.tar.gz"
cp -r "${SRCDIR}/packaging/debian" "${TARNAME}"
kumagi marked this conversation as resolved.
Show resolved Hide resolved
pushd "${TARNAME}"
debuild --no-tgz-check -uc -us -b
kumagi marked this conversation as resolved.
Show resolved Hide resolved
cp "../${TARGET_NAME}_${VERSION}_${ARCHITECTURE}.deb" "${SRCDIR}"
popd
kumagi marked this conversation as resolved.
Show resolved Hide resolved
popd
6 changes: 6 additions & 0 deletions packaging/debian/README.Debian
@@ -0,0 +1,6 @@
libsxg for Debian
-----------------
kumagi marked this conversation as resolved.
Show resolved Hide resolved

Signed HTTP Exhange toolkit library.
kumagi marked this conversation as resolved.
Show resolved Hide resolved

-- Hiroki Kumazaki <kumagi@google.com> Fri, 06 Sep 2019 16:09:52 +0900
5 changes: 5 additions & 0 deletions packaging/debian/changelog
@@ -0,0 +1,5 @@
libsxg (0.1) unstable; urgency=medium

* Initial release

-- Hiroki Kumazaki <kumagi@google.com> Fri, 06 Sep 2019 16:09:52 +0900
1 change: 1 addition & 0 deletions packaging/debian/compat
@@ -0,0 +1 @@
11
kumagi marked this conversation as resolved.
Show resolved Hide resolved
19 changes: 19 additions & 0 deletions packaging/debian/control
@@ -0,0 +1,19 @@
Source: libsxg
Priority: optional
Maintainer: Hiroki Kumazaki <kumagi@google.com>
Build-Depends: debhelper (>= 11)
kumagi marked this conversation as resolved.
Show resolved Hide resolved
Standards-Version: 4.1.3
Section: libs
Homepage: https://github.com/google/libsxg

Package: libsxg-dev
kumagi marked this conversation as resolved.
Show resolved Hide resolved
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: libssl-dev (>=1.1.1c), ${misc:Depends}
Description: Signed HTTP Exchange toolkit library.
kumagi marked this conversation as resolved.
Show resolved Hide resolved
Signed HTTP Exchange(SXG) is file format which contains an HTTP exchange
kumagi marked this conversation as resolved.
Show resolved Hide resolved
(request and response) signed by a publisher's origin.
https://tools.ietf.org/html/draft-yasskin-http-origin-signed-responses-06
If the publisher creates an SXG file with a valid signature, it will be
treated like a valid HTTP response regardless of the distribution channel.
24 changes: 24 additions & 0 deletions packaging/debian/copyright
@@ -0,0 +1,24 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: libsxg
Source: https://github.com/google/libsxg

Files: *
Copyright: 2019 Hiroki Kumazaki <kumagi@google.com>
kumagi marked this conversation as resolved.
Show resolved Hide resolved
License: Apache-2.0

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
.
https://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.
.
On Debian systems, the complete text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".

15 changes: 15 additions & 0 deletions packaging/debian/rules
@@ -0,0 +1,15 @@
#!/usr/bin/make -f
export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall
kumagi marked this conversation as resolved.
Show resolved Hide resolved
export DEB_LDFLAGS_MAINT_APPEND = -Wl

%:
dh $@

override_dh_auto_configure:
dh_auto_configure -- -DSKIP_TEST=TRUE -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=Release

override_dh_auto_install:
dh_auto_install --builddir
dh_install --sourcedir=debian/libsxg-dev/
1 change: 1 addition & 0 deletions packaging/debian/source/format
@@ -0,0 +1 @@
3.0 (quilt)
2 changes: 2 additions & 0 deletions packaging/debian/source/local-options
@@ -0,0 +1,2 @@
#abort-on-upstream-changes
#unapply-patches