Rework debian packaging to include things from anbox-installer

This commit is contained in:
Simon Fels 2017-04-20 20:04:42 +02:00
commit 432bb8d58b
24 changed files with 498 additions and 82 deletions

2
kernel/99-anbox.rules Normal file
View file

@ -0,0 +1,2 @@
KERNEL=="ashmem", NAME="%k", MODE="0666"
KERNEL=="binder", NAME="%k", MODE="0666"

View file

@ -1,13 +0,0 @@
#/usr/bin/make
VERSION = $(shell dpkg-parsechangelog -SVersion)
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

2
kernel/anbox.conf Normal file
View file

@ -0,0 +1,2 @@
ashmem_linux
binder_linux

View file

@ -1,5 +0,0 @@
MODULE_NAME DKMS module for Debian
This package was automatically generated by the DKMS system,
for distribution on Debian based operating systems.

View file

@ -1,18 +0,0 @@
anbox-modules-dkms (4) zesty; urgency=medium
* Fetch dkms version from debian package in post-install step.
-- Simon Fels <morphis@gravedo.de> Thu, 23 Feb 2017 19:12:15 +0100
anbox-modules-dkms (3) zesty; urgency=medium
* Use correct package version in our Makefile to avoid failing module
builds on the target device.
-- Simon Fels <morphis@gravedo.de> Tue, 21 Feb 2017 07:36:45 +0100
anbox-modules-dkms (1) xenial; urgency=low
* Initial release.
-- Simon Fels <morphis@gravedo.de> Mon, 06 Feb 2017 21:43:58 +0100

View file

@ -1 +0,0 @@
7

View file

@ -1,14 +0,0 @@
Source: anbox-modules-dkms
Section: misc
Priority: optional
Maintainer: Simon Fels <morphis@gravedo.de>
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.

View file

@ -1,37 +0,0 @@
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 <morphis@gravedo.de>
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 <http://www.gnu.org/licenses/>.
.
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.

View file

@ -1 +0,0 @@
usr/src

View file

@ -1,51 +0,0 @@
#!/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

View file

@ -1,28 +0,0 @@
#!/bin/sh
NAME=anbox-modules-dkms
VERSION=`dpkg-query -W -f='${Version}' $DEB_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
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

View file

@ -1,15 +0,0 @@
#!/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