diff --git a/kernel/Makefile b/kernel/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..6f2908f485ca9c6d3177f83f67e0a626305446b5 --- /dev/null +++ b/kernel/Makefile @@ -0,0 +1,13 @@ +#/usr/bin/make +VERSION = 1 +SRC = $(DESTDIR)/usr/src + +all: + +clean: + +install: + install -d $(SRC) + for d in ashmem binder ; do \ + cp -a $$d $(SRC)/anbox-modules-$$d-$(VERSION) ; \ + done diff --git a/kernel/ashmem/dkms.conf b/kernel/ashmem/dkms.conf new file mode 100644 index 0000000000000000000000000000000000000000..bde1557c83c94c5cb44099fcca36dcdc01031333 --- /dev/null +++ b/kernel/ashmem/dkms.conf @@ -0,0 +1,7 @@ +PACKAGE_NAME="anbox-ashmem" +PACKAGE_VERSION="1" +CLEAN="make clean" +MAKE[0]="make all KVERSION=$kernelver" +BUILT_MODULE_NAME[0]="ashmem_linux" +DEST_MODULE_LOCATION[0]="/updates" +AUTOINSTALL="yes" diff --git a/kernel/binder/dkms.conf b/kernel/binder/dkms.conf new file mode 100644 index 0000000000000000000000000000000000000000..8484321d1f1e7cedb2413c8934db3bc2c4e0b218 --- /dev/null +++ b/kernel/binder/dkms.conf @@ -0,0 +1,7 @@ +PACKAGE_NAME="anbox-binder" +PACKAGE_VERSION="1" +CLEAN="make clean" +MAKE[0]="make all KVERSION=$kernelver" +BUILT_MODULE_NAME[0]="binder_linux" +DEST_MODULE_LOCATION[0]="/updates" +AUTOINSTALL="yes" diff --git a/kernel/debian/README.Debian b/kernel/debian/README.Debian new file mode 100644 index 0000000000000000000000000000000000000000..f8495d9120fbe9ac0abb5f324ad67fd539845067 --- /dev/null +++ b/kernel/debian/README.Debian @@ -0,0 +1,5 @@ +MODULE_NAME DKMS module for Debian + +This package was automatically generated by the DKMS system, +for distribution on Debian based operating systems. + diff --git a/kernel/debian/changelog b/kernel/debian/changelog new file mode 100644 index 0000000000000000000000000000000000000000..b707d67117c08153851a1cbd245f03d378d006e2 --- /dev/null +++ b/kernel/debian/changelog @@ -0,0 +1,5 @@ +anbox-modules-dkms (1) xenial; urgency=low + + * Initial release. + + -- Simon Fels Mon, 06 Feb 2017 21:43:58 +0100 diff --git a/kernel/debian/compat b/kernel/debian/compat new file mode 100644 index 0000000000000000000000000000000000000000..7f8f011eb73d6043d2e6db9d2c101195ae2801f2 --- /dev/null +++ b/kernel/debian/compat @@ -0,0 +1 @@ +7 diff --git a/kernel/debian/control b/kernel/debian/control new file mode 100644 index 0000000000000000000000000000000000000000..128ba37eb9d634a1c7f8dd57c80eea776c471645 --- /dev/null +++ b/kernel/debian/control @@ -0,0 +1,14 @@ +Source: anbox-modules-dkms +Section: misc +Priority: optional +Maintainer: Simon Fels +Build-Depends: debhelper (>= 7), dkms +Standards-Version: 3.9.7 + +Package: anbox-modules-dkms +Architecture: all +Depends: dkms (>= 1.95), ${misc:Depends} +Description: Android kernel driver (binder, ashmem) in DKMS format. + . + This package contains a out-of-tree version of the core Android + kernel functionalities binder and ashmem. diff --git a/kernel/debian/copyright b/kernel/debian/copyright new file mode 100644 index 0000000000000000000000000000000000000000..650f695bf50ba2ef6510f3f24c89b73fbaab6645 --- /dev/null +++ b/kernel/debian/copyright @@ -0,0 +1,37 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: anbox +Source: http://github.com/anbox + +files: debian/* Makefile +Copyright: 2017 Simon Fels +License: GPL-3 + This program is free software: you can redistribute it and/or modify it + under the terms of the the GNU General Public License version 3, as + published by the Free Software Foundation. + . + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranties of + MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR + PURPOSE. See the applicable version of the GNU Lesser 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 . + . + On Debian systems, the complete text of the GNU General Public License + can be found in `/usr/share/common-licenses/GPL-3' + + +files: ashmem/* binder/* +Copyright: 2008-2012 Google Inc. +License: GPL-2 + Copyright (C) 2008-2012 Google, Inc. + . + This software is licensed under the terms of the GNU General Public + License version 2, as published by the Free Software Foundation, and + may be copied, distributed, and modified under those terms. + . + 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. diff --git a/kernel/debian/dirs b/kernel/debian/dirs new file mode 100644 index 0000000000000000000000000000000000000000..b601f22c481a4bbed8de2d17be79a85f7f9cbc4d --- /dev/null +++ b/kernel/debian/dirs @@ -0,0 +1 @@ +usr/src diff --git a/kernel/debian/postinst b/kernel/debian/postinst new file mode 100755 index 0000000000000000000000000000000000000000..6634ce3c511acb74ac66d56c7d1801d0448b95f9 --- /dev/null +++ b/kernel/debian/postinst @@ -0,0 +1,51 @@ +#!/bin/sh +# Copyright (C) 2002-2005 Flavio Stanchina +# Copyright (C) 2005-2006 Aric Cyr +# Copyright (C) 2007 Mario Limonciello +# Copyright (C) 2009 Alberto Milone + +set -e + +NAME=anbox-modules +PACKAGE_NAME=$NAME-dkms +DEB_NAME=$(echo $PACKAGE_NAME | sed 's,_,-,') +CVERSION=`dpkg-query -W -f='${Version}' $DEB_NAME | awk -F "-" '{print $1}' | cut -d\: -f2` +ARCH=`dpkg --print-architecture` + +dkms_configure () { + for POSTINST in /usr/lib/dkms/common.postinst "/usr/share/$PACKAGE_NAME/postinst"; do + if [ -f "$POSTINST" ]; then + for d in ashmem binder ; do + "$POSTINST" "$NAME-$d" "$CVERSION" "/usr/share/$PACKAGE_NAME" "$ARCH" "$2" + done + return 0 + fi + echo "WARNING: $POSTINST does not exist." >&2 + done + echo "ERROR: DKMS version is too old and $PACKAGE_NAME was not" >&2 + echo "built with legacy DKMS support." >&2 + echo "You must either rebuild $PACKAGE_NAME with legacy postinst" >&2 + echo "support or upgrade DKMS to a more current version." >&2 + return 1 +} + +case "$1" in + configure) + dkms_configure + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/kernel/debian/prerm b/kernel/debian/prerm new file mode 100755 index 0000000000000000000000000000000000000000..0b83484dc434e2872a0ddc8ace2871e808e9bbd0 --- /dev/null +++ b/kernel/debian/prerm @@ -0,0 +1,28 @@ +#!/bin/sh + +NAME=anbox-modules-dkms +VERSION=1 + +set -e + +case "$1" in + remove|upgrade|deconfigure) + if [ "`dkms status -m $NAME`" ]; then + dkms remove -m $NAME -v $VERSION --all + fi + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + + diff --git a/kernel/debian/rules b/kernel/debian/rules new file mode 100755 index 0000000000000000000000000000000000000000..b15c6491753f3fcbf1451ffface80d65b21ecb3d --- /dev/null +++ b/kernel/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DEB_NAME=anbox-modules + +include /usr/share/dpkg/default.mk + +%: + dh $@ --parallel --fail-missing + +override_dh_install: + $(MAKE) DESTDIR=$(CURDIR)/debian/$(DEB_NAME)-dkms install