Merge pull request #3 from endlessm/T23859-debian-packaging

debian: Initial Debian packaging
This commit is contained in:
Georges Basile Stavracas Neto 2018-10-08 11:53:40 +00:00 committed by GitHub
commit 65d52a50a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 307 additions and 1 deletions

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
eos-parental-controls (0) UNRELEASED; urgency=low
* Initial release (Closes: T23859)
-- Philip Withnall <withnall@endlessm.com> Fri, 05 Oct 2018 23:36:00 +0100

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
10

94
debian/control vendored Normal file
View File

@ -0,0 +1,94 @@
Source: eos-parental-controls
Section: misc
Priority: optional
Maintainer: Philip Withnall <withnall@endlessm.com>
Standards-Version: 4.1.2
Build-Depends:
debhelper (>= 10),
gir1.2-glib-2.0,
gobject-introspection (>= 1.30.0),
gtk-doc-tools,
libaccountsservice-dev,
libdbus-1-dev,
libgirepository1.0-dev (>= 1.30.0),
libglib2.0-dev (>= 2.54.2),
meson,
policykit-1,
python3-gi,
Package: eos-parental-controls-data
Section: misc
Architecture: all
Depends:
accountsservice,
policykit-1,
${misc:Depends},
Description: Parental Controls - architecture independent files
This package contains the architecture-independent data files.
Package: eos-parental-controls-tools
Section: misc
Architecture: any
Multi-arch: same
Depends:
eos-parental-controls-data (= ${source:Version}),
gir1.2-eos-parental-controls-0,
gir1.2-glib-2.0,
python3,
python3-gi,
${misc:Depends},
Description: Parental Controls Tools
This package contains tools for querying and updating the parental controls
settings for users.
Package: gir1.2-eos-parental-controls-0
Section: introspection
Architecture: any
Multi-arch: same
Depends:
${gir:Depends},
${misc:Depends},
Description: Parental Controls Library - introspection bindings
This package contains a library for accessing the parental controls settings
for users.
.
This package contains a machine-readable API description for
libeos-parental-controls for use by the client tools and other clients.
Package: libeos-parental-controls-0
Section: misc
Architecture: any
Depends:
eos-parental-controls-data (= ${source:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Parental Controls Library
This package contains a library for accessing the parental controls settings
for users.
Package: libeos-parental-controls-0-dev
Section: libdevel
Architecture: any
Multi-arch: same
Depends:
libglib2.0-dev,
libeos-parental-controls-0 (= ${binary:Version}),
${misc:Depends},
Description: Parental Controls Library - library development
This package contains a library for accessing the parental controls settings
for users.
.
This package contains development files for clients.
Package: libeos-parental-controls-0-tests
Section: misc
Architecture: any
Depends:
${misc:Depends},
${shlibs:Depends},
Description: Parental Controls Library - tests
This package contains a library for accessing the parental controls settings
for users.
.
This package contains unit tests for the client APIs used to access the
parental controls.

20
debian/copyright vendored Normal file
View File

@ -0,0 +1,20 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: eos-parental-controls
Upstream-Contact: Philip Withnall <withnall@endlessm.com>
Source: github.com/endlessm/eos-parental-controls
Disclaimer: Not part of the Debian distribution.
Copyright: Copyright 2018 Endless Mobile, Inc.
License: LGPL-2.1+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
.
This library 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
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

1
debian/docs vendored Normal file
View File

@ -0,0 +1 @@
README

View File

@ -0,0 +1,3 @@
usr/share/accountsservice/interfaces/com.endlessm.ParentalControls.AppFilter.xml
usr/share/dbus-1/interfaces/com.endlessm.ParentalControls.AppFilter.xml
usr/share/polkit-1/actions/com.endlessm.ParentalControls.policy

View File

@ -0,0 +1,2 @@
usr/bin/eos-parental-controls-client
usr/share/man/man8/eos-parental-controls-client.8*

6
debian/gbp.conf vendored Normal file
View File

@ -0,0 +1,6 @@
[DEFAULT]
debian-tag = Version_%(version)s
debian-branch = master
[dch]
ignore-branch = True

View File

@ -0,0 +1 @@
usr/lib/*/girepository-1.0/EosParentalControls-0.*

View File

@ -0,0 +1,3 @@
usr/include/eos-parental-controls-0
usr/lib/*/pkgconfig/eos-parental-controls-0.pc
usr/share/gir-1.0/EosParentalControls-0.gir

View File

@ -0,0 +1,2 @@
usr/lib/*/installed-tests/libeos-parental-controls-0
usr/share/installed-tests/libeos-parental-controls-0

View File

@ -0,0 +1 @@
usr/lib/*/libeos-parental-controls-0.so*

17
debian/rules vendored Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/make -f
# -*- makefile -*-
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export LC_ALL=C.UTF-8
override_dh_auto_configure:
dh_auto_configure \
-- \
-Dinstalled_tests=true \
$(NULL)
override_dh_missing:
dh_missing --fail-missing
%:
dh $@ --with gir --parallel

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)

4
debian/tests/control vendored Normal file
View File

@ -0,0 +1,4 @@
Tests: gnome-desktop-testing
Depends:
gnome-desktop-testing,
libeos-parental-controls-0-tests,

27
debian/tests/gnome-desktop-testing vendored Normal file
View File

@ -0,0 +1,27 @@
#!/bin/sh
# Run the eos-parental-controls installed-tests which do not require root
# privileges.
# Copyright © 2017, 2018 Endless Mobile, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
set -e
exec 2>&1
exec gnome-desktop-testing-runner \
libeos-parental-controls-0 \
--

View File

@ -54,3 +54,5 @@ gnome.generate_gir(libeos_parental_controls,
includes: ['GObject-2.0', 'Gio-2.0'],
install: true,
)
subdir('tests')

View File

@ -0,0 +1,48 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright © 2018 Endless Mobile, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* - Philip Withnall <withnall@endlessm.com>
*/
#include "config.h"
#include <glib.h>
#include <gio/gio.h>
#include <libeos-parental-controls/app-filter.h>
#include <locale.h>
/* A placeholder smoketest which checks that the error quark works. */
static void
test_app_filter_error_quark (void)
{
g_assert_cmpint (epc_app_filter_error_quark (), !=, 0);
}
int
main (int argc,
char **argv)
{
setlocale (LC_ALL, "");
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/app-filter/error-quark", test_app_filter_error_quark);
return g_test_run ();
}

View File

@ -0,0 +1,50 @@
deps = [
dependency('gio-2.0', version: '>= 2.44'),
dependency('glib-2.0', version: '>= 2.54.2'),
dependency('gobject-2.0', version: '>= 2.44'),
libeos_parental_controls_dep,
]
envs = test_env + [
'G_TEST_SRCDIR=' + meson.current_source_dir(),
'G_TEST_BUILDDIR=' + meson.current_build_dir(),
]
test_programs = [
['app-filter', [], deps],
]
installed_tests_metadir = join_paths(datadir, 'installed-tests',
'libeos-parental-controls-' + libeos_parental_controls_api_version)
installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
'libeos-parental-controls-' + libeos_parental_controls_api_version)
foreach program: test_programs
test_conf = configuration_data()
test_conf.set('installed_tests_dir', installed_tests_execdir)
test_conf.set('program', program[0])
configure_file(
input: test_template,
output: program[0] + '.test',
install: enable_installed_tests,
install_dir: installed_tests_metadir,
configuration: test_conf,
)
exe = executable(
program[0],
[program[0] + '.c'] + program[1],
dependencies: program[2],
include_directories: root_inc,
install: enable_installed_tests,
install_dir: installed_tests_execdir,
)
test(
program[0],
exe,
env: envs,
args: ['--tap'],
)
endforeach

View File

@ -19,6 +19,7 @@ po_dir = join_paths(meson.source_root(), 'po')
prefix = get_option('prefix')
bindir = join_paths(prefix, get_option('bindir'))
datadir = join_paths(prefix, get_option('datadir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
# FIXME: This isnt exposed in accountsservice.pc
# See https://gitlab.freedesktop.org/accountsservice/accountsservice/merge_requests/16
@ -103,6 +104,14 @@ test_c_args = [
cc = meson.get_compiler('c')
add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c')
enable_installed_tests = get_option('installed_tests')
test_template = files('template.test.in')
test_env = [
'G_DEBUG=gc-friendly,fatal-warnings',
'MALLOC_CHECK_=2',
'LC_ALL=C.UTF-8',
]
subdir('accounts-service')
subdir('eos-parental-controls-client')
subdir('libeos-parental-controls')

6
meson_options.txt Normal file
View File

@ -0,0 +1,6 @@
option(
'installed_tests',
type: 'boolean',
value: false,
description: 'enable installed tests'
)

3
template.test.in Normal file
View File

@ -0,0 +1,3 @@
[Test]
Type=session
Exec=@installed_tests_dir@/@program@