Commit 3edea433 authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Set up deb

parent 31e3e9ec
Pipeline #130232 passed with stages
in 14 minutes and 55 seconds
......@@ -26,6 +26,14 @@ mingw:
- public
expire_in: 1 week
deb:
stage: check
script: "./ci/deb.sh"
artifacts:
paths:
- public
expire_in: 1 week
pages:
stage: manual
script: "./ci/pages.sh"
......
......@@ -43,6 +43,7 @@ include icon/Makefile.am
include gnulib.am
include screenshots/Makefile.am
include nsi/Makefile.am
include debian/Makefile.am
AM_CPPFLAGS += \
-DLOCALEDIR="\"$(localedir)\"" \
......
......@@ -20,4 +20,5 @@ EXTRA_DIST += \
%reldir%/dist.sh \
%reldir%/pages.sh \
%reldir%/check.sh \
%reldir%/mingw.sh
%reldir%/mingw.sh \
%reldir%/deb.sh
#!/bin/sh
apt-get update || exit 1
apt-get install -y \
build-essential \
dbus \
dbus-x11 \
libcairo2-dev \
libglib2.0-dev \
libgtk-3-0 \
libgtk-3-dev \
libreadline-dev \
libxml2 \
libxml2-dev \
nettle-dev \
pkg-config \
valgrind \
debhelper \
dh-make \
|| exit 1
export $(dbus-launch)
mkdir -p public || exit 1
echo "Build tarot"
VERSION=$(cat dist/version)
cp dist/tarot-$VERSION.tar.gz . || exit 1
tar xf tarot-$VERSION.tar.gz || exit 1
cd tarot-$VERSION
./configure DPKG_BUILDPACKAGEFLAGS="-us -uc" || exit 1
make -j 8 deb || exit 1
cp $(make print-debfiles) ../public/
make -j distclean || exit 1
cd ..
......@@ -61,6 +61,13 @@ AM_MISSING_PROG([MAKENSIS], [makensis])
AC_ARG_VAR([HOST_SYSROOT], [Where to steal the windows DLLs for gtk+ and friends. On Fedora it is /usr/x86_64-w64-mingw32/sys-root/mingw])
AC_CHECK_TOOL([WINDRES], [windres], [no])
AM_CONDITIONAL([HAVE_WINDRES], [test "x$WINDRES" != "xno"])
AM_MISSING_PROG([DPKG_BUILDPACKAGE], [dpkg-buildpackage])
AC_ARG_VAR([DPKG_BUILDPACKAGEFLAGS], [Additional flags to pass to dpkg-buildpackage (such as, -us -uc or -key KEY)])
AS_IF([test "x$host_cpu" = "xx86_64"], [
AC_SUBST([DEBARCH], [amd64])
], [
AC_SUBST([DEBARCH], [$host_cpu])
])
# Checks for libraries.
gl_INIT
......
# debian/Makefile.am
#
# Copyright (C) 2019 Vivien Kraus <vivien@planete-kraus.eu>
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
EXTRA_DIST += \
%reldir%/changelog \
%reldir%/compat \
%reldir%/control \
%reldir%/copyright \
%reldir%/README.Debian \
%reldir%/README.source \
%reldir%/rules \
%reldir%/source/format \
%reldir%/tarot.doc-base.manual \
%reldir%/tarot-docs.docs \
%reldir%/gen-changelog.xsl
MAINTAINERCLEANFILES += \
%reldir%/changelog
DEBFILES = \
$(PACKAGE)_$(VERSION)-1_$(DEBARCH).deb \
$(PACKAGE)_$(VERSION)-1_$(DEBARCH).buildinfo \
$(PACKAGE)_$(VERSION)-1_$(DEBARCH).changes \
$(PACKAGE)-dbgsym_$(VERSION)-1_$(DEBARCH).deb \
$(PACKAGE)-dbgsym_$(VERSION)-1_$(DEBARCH).buildinfo \
$(PACKAGE)-dbgsym_$(VERSION)-1_$(DEBARCH).changes \
$(PACKAGE)_$(VERSION)-1.dsc \
$(PACKAGE)_$(VERSION).orig.tar.gz \
$(PACKAGE)_$(VERSION)-1.debian.tar.gz \
$(PACKAGE)_$(VERSION).tar.gz
CLEANFILES += $(DEBFILES)
$(srcdir)/%reldir%/changelog: releases.xml %reldir%/gen-changelog.xsl .version
$(AM_V_GEN) $(XSLTPROC) \
--stringparam snapshot "$$(if test x$(VERSION_ADDITIONAL) = x ; then echo no ; else echo yes ; fi)" \
--stringparam version "$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)$(VERSION_ADDITIONAL)" \
--stringparam libtool "$(LIBTOOL_CURRENT).$(LIBTOOL_REVISION).$(LIBTOOL_AGE)" \
--stringparam author "Vivien Kraus" \
--stringparam email "vivien@planete-kraus.eu" \
--stringparam date "$$(LANG=C date '+%a, %d %b %Y %T %z')" \
$(srcdir)/%reldir%/gen-changelog.xsl \
$(srcdir)/releases.xml \
> $(srcdir)/%reldir%/changelog-t
@mv $(srcdir)/%reldir%/changelog-t $(srcdir)/%reldir%/changelog
dpkg_verbose = $(dpkg_verbose_@AM_V@)
dpkg_verbose_ = $(dpkg_verbose_@AM_DEFAULT_V@)
dpkg_verbose_0 = @echo " DPKG";
.PHONY: deb print-debfiles
deb: dist
@cp $(DIST_ARCHIVES) $(PACKAGE)_$(VERSION).orig.tar.gz
$(MAKE) $(AM_MAKEFLAGS) distdir
$(dpkg_verbose) (cd $(distdir) && $(DPKG_BUILDPACKAGE) $(DPKG_BUILDPACKAGEFLAGS))
print-debfiles:
@for file in $(DEBFILES) ; do echo $$file ; done
tarot for Debian
---------------
<possible notes regarding this package - if none, delete this file>
-- Vivien Kraus <vivien@planete-kraus.eu> Sun, 17 Mar 2019 19:31:29 +0100
tarot for Debian
---------------
<this file describes information about the source package, see Debian policy
manual section 4.14. You WILL either need to modify or delete this file>
-- Vivien Kraus <vivien@planete-kraus.eu> Sun, 17 Mar 2019 19:31:29 +0100
Source: tarot
Section: unknown
Priority: optional
Maintainer: Vivien Kraus <vivien@planete-kraus.eu>
Build-Depends: debhelper, libglib2.0-dev, libgtk-3-dev, libreadline-dev, pkg-config
Standards-Version: 4.1.3
Homepage: https://play-tarot.frama.io/tarot/
Vcs-Browser: https://framagit.org/play-tarot/tarot
Vcs-Git: https://framagit.org/play-tarot/tarot.git
Package: tarot
Architecture: any
Depends: libglib2.0-0, libgtk-3-0
Description: The tarot package
Play tarot.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: tarot
Source: <url://example.com>
Files: *
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: <special license>
<Put the license of the package here indented by 1 space>
<This follows the format of Description: lines in control file>
.
<Including paragraphs>
# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2019 Vivien Kraus <vivien@planete-kraus.eu>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid picking licenses with terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text" indent="no"/>
<xsl:strip-space elements="*" />
<xsl:template name="print">
<xsl:param name="version" />
<xsl:param name="author" />
<xsl:param name="email" />
<xsl:param name="deb-date" />
<xsl:param name="summary" />
<xsl:text>tarot (</xsl:text><xsl:value-of select="$version" /><xsl:text>-1) UNRELEASED; urgency=medium&#xA;&#xA; * </xsl:text><xsl:value-of select="normalize-space($summary)" /><xsl:text>&#xA;&#xA; -- </xsl:text><xsl:value-of select="$author" /><xsl:text> &lt;</xsl:text><xsl:value-of select="$email" /><xsl:text>&gt; </xsl:text><xsl:value-of select="$date" /><xsl:text>&#xA;&#xA;</xsl:text>
</xsl:template>
<xsl:template match="releases">
<xsl:if test="$snapshot = 'yes'">
<xsl:call-template name="print">
<xsl:with-param name="version" select="$version" />
<xsl:with-param name="author" select="$author" />
<xsl:with-param name="email" select="$email" />
<xsl:with-param name="deb-date" select="$date" />
<xsl:with-param name="summary">
Development snapshot
</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="release">
<xsl:call-template name="print">
<xsl:with-param name="version" select="@version" />
<xsl:with-param name="author" select="@author" />
<xsl:with-param name="email" select="@email" />
<xsl:with-param name="deb-date" select="@deb-date" />
<xsl:with-param name="summary">
<xsl:apply-templates select="summary" />
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="summary">
<xsl:apply-templates />
</xsl:template>
</xsl:stylesheet>
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
%:
dh $@ --without autoreconf
# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
README.Debian
README.source
Document: tarot
Title: Tarot User Manual
Author: Vivien Kraus
Abstract: This manual describes the usage of the tarot program
Section: Games/Cards
Format: info
Index: /usr/share/info/tarot.info.gz
Files: /usr/share/info/*
......@@ -7,8 +7,12 @@ do
TAG_CHARS=$(echo "$tag" | wc -c)
TAG_HEADER=$(git tag -l -n $tag | tail -c +$TAG_CHARS | sed 's/\.[[:space:]]$//g')
TAG_DATE=$(git log -1 --format=%ai $tag)
TAG_DATE_DEB=$(LANG=C date --date="$TAG_DATE" "+%a, %d %b %Y %T %z")
TAG_AUTHOR=$(git log -1 --format=%an $tag)
TAG_EMAIL=$(git log -1 --format=%ae $tag)
TAG_VERSION_FULL=$(echo "$tag" | tail -c +2)
TAG_PROGRAM_VERSION=$(echo "$TAG_VERSION_FULL" | cut -d '/' -f 1)
TAG_LIBTOOL_VERSION=$(echo "$TAG_VERSION_FULL" | cut -d '/' -f 2)
echo "#+title: $TAG_HEADER" > tag.org
echo "#+date: $TAG_DATE" >> tag.org
......@@ -17,7 +21,7 @@ do
git tag -l -n999 $tag | tail -n +2 >> tag.org
emacs --batch --file tag.org --eval "(org-html-export-to-html nil nil nil t '())" || exit 1
echo " <release version=\"$(echo $tag | tail -c +2)\" date=\"$TAG_DATE\">"
echo " <release version=\"$(echo $TAG_PROGRAM_VERSION)\" libtool=\"$(echo $TAG_LIBTOOL_VERSION)\" date=\"$TAG_DATE\" deb-date=\"$TAG_DATE_DEB\" author=\"$TAG_AUTHOR\" email=\"$TAG_EMAIL\">"
echo " <summary>"
echo "$TAG_HEADER"
echo " </summary>"
......
......@@ -41,7 +41,7 @@ nsi_verbose = $(nsi_verbose_@AM_V@)
nsi_verbose_ = $(nsi_verbose_@AM_DEFAULT_V@)
nsi_verbose_0 = @echo " MAKENSIS $@";
.PHONY: nsi
.PHONY: nsi clean-nsi
$(srcdir)/%reldir%/tarot.ico: icon/256x256/eu.planete_kraus.Tarot.png \
icon/48x48/eu.planete_kraus.Tarot.png \
......@@ -56,7 +56,9 @@ $(srcdir)/%reldir%/tarot.ico: icon/256x256/eu.planete_kraus.Tarot.png \
$(srcdir)/%reldir%/tarot.rc: %reldir%/tarot.ico
clean-local:
clean-local: clean-nsi
clean-nsi:
rm -rf %reldir%/bin %reldir%/share %reldir%/include %reldir%/lib
nsi:
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tarot 0.4.2.83-ebdc-dirty\n"
"Report-Msgid-Bugs-To: vivien@planete-kraus.eu\n"
"POT-Creation-Date: 2019-04-25 20:21+0200\n"
"POT-Creation-Date: 2019-04-26 22:24+0200\n"
"PO-Revision-Date: 2019-04-22 15:59+0200\n"
"Last-Translator: Vivien Kraus <vivien@planete-kraus.eu>\n"
"Language-Team: French\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment