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 packaging: merge some improvements from Debian #121

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions debian/cjs-tests.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
usr/share/glib-2.0/schemas/org.cinnamon.CjsTest.gschema.xml
usr/share/installed-tests
usr/libexec/installed-tests/cjs
3 changes: 3 additions & 0 deletions debian/cjs-tests.lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Test data is not documentation, even if it's in a text file
package-contains-documentation-outside-usr-share-doc [usr/libexec/installed-tests/*]
library-not-linked-against-libc [usr/libexec/installed-tests/cjs/*.so]
44 changes: 39 additions & 5 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ Vcs-Git: https://github.com/linuxmint/cjs.git

Package: cjs
Architecture: any
Depends: gir1.2-gtk-3.0, ${misc:Depends}, ${shlibs:Depends}
Depends:
gir1.2-gtk-3.0,
${misc:Depends},
${shlibs:Depends},
Description: Mozilla-based javascript bindings for the Cinnamon platform (cli tool)
Makes it possible for applications to use all of Cinnamon's platform
libraries using the JavaScript language. It's mainly based on the
Expand All @@ -37,6 +40,20 @@ Description: Mozilla-based javascript bindings for the Cinnamon platform (cli to
uses.
.
This package contains the interactive console application.

Package: cjs-tests
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
cjs,
at-spi2-core
Description: Mozilla-based javascript bindings for the Cinnamon platform (tests)
Makes it possible for applications to use all of Cinnamon's platform
libraries using the JavaScript language. It's mainly based on the
Mozilla JavaScript engine and the GObject introspection framework.
.
This package is the frozen version of gjs that the cinnamon desktop currently
uses.
.
This package contains test programs, designed to be run as part of a
regression testsuite.
Expand All @@ -45,7 +62,9 @@ Package: libcjs-dbg
Section: debug
Architecture: any
Priority: extra
Depends: libcjs0 (= ${binary:Version}), ${misc:Depends}
Depends:
libcjs0 (= ${binary:Version}),
${misc:Depends},
Description: Mozilla-based javascript bindings for the Cinnamon platform
Makes it possible for applications to use all of Cinnamon platform
libraries using the JavaScript language. It's mainly based on the
Expand Down Expand Up @@ -82,9 +101,24 @@ Package: libcjs0
Architecture: any
Multi-Arch: same
Section: libs
Depends: ${gir:Depends}, ${misc:Depends}, ${shlibs:Depends}
Conflicts: libcjs0a, libcjs0c, libcjs0e, libcjs0f
Replaces: libcjs0a, libcjs0c, libcjs0e, libcjs0f
Depends:
${gir:Depends},
${misc:Depends},
${shlibs:Depends},
gir1.2-gio-2.0,
gir1.2-girepository-2.0,
gir1.2-glib-2.0,
gir1.2-gobject-2.0,
Conflicts:
libcjs0a,
libcjs0c,
libcjs0e,
libcjs0f,
Replaces:
libcjs0a,
libcjs0c,
libcjs0e,
libcjs0f,
Description: Mozilla-based javascript bindings for the Cinnamon platform
Makes it possible for applications to use all of Cinnamon platform
libraries using the JavaScript language. It's mainly based on the
Expand Down
14 changes: 13 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,24 @@ override_dh_auto_configure:
dh_auto_configure -- \
-Dauto_features=enabled \
-Dprofiler=disabled \
-Dinstalled_tests=false \
-Dinstalled_tests=true \
$(NULL)

execute_after_dh_auto_install:
rm -f debian/tmp/usr/libexec/installed-tests/cjs/js/modules/*/.eslintrc.yml

override_dh_girepository:
dh_girepository -l $(BUILDDIR) /usr/lib/$(DEB_HOST_MULTIARCH)/cjs/girepository-1.0

# debhelper >= 13.4 makes all of /usr/libexec executable, which is not
# quite right for installed-tests
override_dh_fixperms:
dh_fixperms -Xusr/libexec/installed-tests
ifneq ($(filter %-tests,$(built_binaries)),)
chmod --changes u=rw,og=r debian/*-tests/usr/libexec/installed-tests/cjs/*.so
chmod --recursive --changes a+rX,u+w,og-w debian/*-tests/usr/libexec/installed-tests
endif

override_dh_auto_test:
GI_TYPELIB_PATH=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE) \
obj-$(DEB_HOST_GNU_TYPE)/cjs-console -c 'print("Smoke-test OK")'
Expand Down
12 changes: 9 additions & 3 deletions debian/tests/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Tests: acc
Depends: @, dh-acc, exuberant-ctags
Restrictions: allow-stderr, superficial

Tests: build
Depends: build-essential, libcjs-dev
Depends: libcjs-dev, build-essential
Restrictions: superficial

Tests: installed-tests
Depends: dbus-daemon, dbus-x11, cjs-tests, gnome-desktop-testing, xauth, xvfb

#Tests: installed-tests
#Depends: dbus-daemon, dbus-x11, cjs-tests, gnome-desktop-testing, xauth, xvfb
2 changes: 1 addition & 1 deletion debian/tests/installed-tests
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export XDG_RUNTIME_DIR=$AUTOPKGTEST_TMP
export LC_ALL=C.UTF-8

# dbus outputs activation messages to stderr which fails the test
dbus-run-session -- xvfb-run -a gnome-desktop-testing-runner gjs 2> >(grep -vE '^(Activating|Successfully activated)')>&2
dbus-run-session -- xvfb-run -a gnome-desktop-testing-runner cjs 2> >(grep -vE '^(Activating|Successfully activated)')>&2
4 changes: 0 additions & 4 deletions debian/tests/testsuite

This file was deleted.

Loading