summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Salveti de Araujo <ricardo.salveti@linaro.org>2012-03-26 00:16:00 -0300
committerRicardo Salveti de Araujo <ricardo.salveti@linaro.org>2012-03-26 03:41:56 -0300
commita12500e474a7768efada0d4e1daec51322e151e1 (patch)
treeadce8b76c42b687c85f1fc625c38ffa8f1f0bc32
parenta5f51dee3f8480b7bfb309a9cd6a05c87d013858 (diff)
Initial release, based on package provided at TI's release PPA https://launchpad.net/~tiomap-dev/+archive/release
* Initial release, based on package provided at TI's release PPA https://launchpad.net/~tiomap-dev/+archive/release * FFe and needs-packaging request at (LP: #959924) Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org>
-rw-r--r--debian/Makefile48
-rw-r--r--debian/changelog7
-rw-r--r--debian/clean10
-rw-r--r--debian/compat1
-rw-r--r--debian/control39
-rw-r--r--debian/copyright139
-rw-r--r--debian/dkms.conf.in8
-rw-r--r--debian/dkms/patches/disable_pm_runtime_put_sync.patch17
-rw-r--r--debian/pvr-omap4-dbg.dirs.in1
-rw-r--r--debian/pvr-omap4-dbg.install.in2
-rw-r--r--debian/pvr-omap4-dbg.lintian-overrides1
-rw-r--r--debian/pvr-omap4-dev.dirs.in1
-rw-r--r--debian/pvr-omap4-dev.install.in1
-rw-r--r--debian/pvr-omap4-dev.lintian-overrides1
-rw-r--r--debian/pvr-omap4.dirs.in2
-rw-r--r--debian/pvr-omap4.install.in19
-rw-r--r--debian/pvr-omap4.lintian-overrides4
-rw-r--r--debian/pvr-omap4.postinst.in62
-rw-r--r--debian/pvr-omap4.postrm.in49
-rw-r--r--debian/pvr-omap4.prerm.in36
-rwxr-xr-xdebian/rules138
-rw-r--r--debian/watch2
22 files changed, 588 insertions, 0 deletions
diff --git a/debian/Makefile b/debian/Makefile
new file mode 100644
index 0000000..33f8752
--- /dev/null
+++ b/debian/Makefile
@@ -0,0 +1,48 @@
+# This top-level makefile is called by DKMS.
+# It must provide targets: 'all' and 'clean'.
+# Making 'all' the default target is nice to have.
+# This makefile must take the $KVERSION variable into account.
+
+.PHONY: all clean
+
+# Set to 'release' for "normal" build.
+# Set to 'debug' for debug build.
+# (Note that you will need libraries & apps compiled in
+# 'debug' too for this to be usable.)
+FLAVOUR := release
+
+# This suffix is appended to module name.
+SUFFIX-debug := -debug
+SUFFIX-release :=
+SUFFIX := $(SUFFIX-$(FLAVOUR))
+
+# Define for verbose build.
+#export V := 1
+
+KVERSION ?= $(shell uname -r)
+export CROSS_COMPILE :=
+export DISCIMAGE := $(PWD)
+export KERNELDIR := /usr/src/linux-headers-$(KVERSION)
+DIR := eurasiacon/build/linux2/omap4430_linux
+
+# We want to compile with two jobs per cpu.
+JOBS := $(shell bash -c 'cpu=`egrep "^processor" /proc/cpuinfo |wc -l`; [ $$cpu == 0 ] && cpu=1; echo $$(($$cpu * 2))')
+
+MAKE_OPTS-debug := BUILD=debug
+MAKE_OPTS-release :=
+MAKE_OPTS := -j$(JOBS) SUPPORT_V4L2_GFX=0 $(MAKE_OPTS-$(FLAVOUR))
+
+MODULES := omapdrm_pvr # gfx_vout_mod
+
+all:
+ @set -e; \
+ $(MAKE) -C $(DIR) $(MAKE_OPTS); \
+ \
+ for m in $(MODULES); do \
+ cp -v "eurasiacon/binary2_omap4430_linux_$(FLAVOUR)/target/$$m.ko" "$${m}$(SUFFIX).ko"; \
+ done
+# Note: we replace the 'make install' step by our cp for now.
+
+clean:
+ $(MAKE) -C $(DIR) $(MAKE_OPTS) clean \
+ && rm -f *.ko
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..622e0f5
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,7 @@
+pvr-omap4 (1.7.10.0.1.21-0ubuntu1) UNRELEASED; urgency=low
+
+ * Initial release, based on package provided at TI's release PPA
+ https://launchpad.net/~tiomap-dev/+archive/release
+ * FFe and needs-packaging request at (LP: #959924)
+
+ -- Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> Mon, 26 Mar 2012 00:15:10 -0300
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..577b720
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,10 @@
+debian/dkms.conf
+debian/pvr-omap4.dirs
+debian/pvr-omap4.install
+debian/pvr-omap4.postinst
+debian/pvr-omap4.postrm
+debian/pvr-omap4.prerm
+debian/pvr-omap4-dbg.dirs
+debian/pvr-omap4-dbg.install
+debian/pvr-omap4-dev.dirs
+debian/pvr-omap4-dev.install
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..fd34c03
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,39 @@
+Source: pvr-omap4
+Section: restricted/misc
+Priority: extra
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+Build-Depends: debhelper (>= 7.0.50~),
+ chrpath,
+ libxext6,
+ libxfixes3 (>= 1:4.0.1),
+ xserver-xorg-dev (>= 2:1.11.0)
+Standards-Version: 3.9.3
+Homepage: https://launchpad.net/~tiomap-dev/+archive/release
+
+Package: pvr-omap4
+Architecture: armhf
+Depends: dkms (>= 1.95), make, coreutils (>= 8.5),
+ grep (>= 2.6.3), dos2unix, linux-headers-omap4,
+ ${xviddriver:Depends}, ${misc:Depends}, ${shlibs:Depends}
+Description: PowerVR SGX540 libraries for OMAP4, libs and drivers.
+ PowerVR SGX540 Linux libraries for OMAP4.
+ .
+ This package provides 2D display drivers and hardware accelerated OpenGL-ES.
+
+Package: pvr-omap4-dbg
+Section: restricted/debug
+Architecture: armhf
+Depends: pvr-omap4 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: PowerVR SGX540 libraries for OMAP4, debugging symbols
+ PowerVR SGX540 Linux libraries for OMAP4.
+ .
+ This package provides the 2D display drivers and hardware accelerated
+ OpenGL-ES debugging symbols files.
+
+Package: pvr-omap4-dev
+Architecture: armhf
+Depends: pvr-omap4 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
+Description: PowerVR SGX540 libraries for OMAP4, development files
+ PowerVR SGX540 Linux libraries for OMAP4.
+ .
+ This package provides definitions for the EGL and GLES extensions.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..7861e87
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,139 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: PowerVR SGX540 OpenGL-ES Driver for Omap 4
+Upstream-Contact: TI OMAP Developers <tiomap-dev@lists.launchpad.net>
+Source: https://launchpad.net/~tiomap-dev/+archive/release
+
+Files: debian/*
+Copyright: 2002-2005, Flavio Stanchina
+ 2005-2006, Aric Cyr
+ 2007-2009, Mario Limonciello
+ 2009-2011, Canonical Ltd.
+ 2010-2011, Texas Instruments Incorporated
+ 2012, Linaro Limited
+License: MIT
+
+Files: Makefile
+Copyright: 2010, Texas Instruments Incorporated
+License: TI TSPA
+
+Files: fetch-pvr-omap/*
+Copyright: 2010, Texas Instruments Incorporated
+License: TI TSPA
+
+Files: usr/*
+Copyright: 2010, Texas Instruments Incorporated
+ 2007-2009, The Khronos Group Inc.
+ 2008, Imagination Technologies Ltd <gpl-support@imgtec.com>
+ 2006, Silicon Graphics, Inc.
+License: TI TSPA
+
+Files: sgx/*
+Copyright: 2008, Imagination Technologies Ltd <gpl-support@imgtec.com>
+ 2010, Texas Instruments Incorporated
+License: GPL-2+
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+License: TI TSPA
+ TECHNOLOGY AND SOFTWARE PUBLICLY AVAILABLE
+ SOFTWARE LICENSE FOR OMAP(TM) 4 USER SPACE GRAPHICS DRIVER BINARY
+ .
+ Copyright (c) 2011, Texas Instruments Incorporated.
+ Portions (c), Imagination Technologies Limited.
+ .
+ All rights reserved.
+ .
+ Redistribution:
+ .
+ Redistribution and use in binary form, without modification, are
+ permitted provided that the following conditions are met:
+ .
+ * Redistributions must preserve existing copyright notices and reproduce
+ this license (including the above copyright notice and the disclaimer
+ below) in the documentation and/or other materials provided with the
+ distribution.
+ .
+ * Neither the name of Texas Instruments Incorporated nor the names of its
+ suppliers may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+ .
+ * No reverse engineering, decompilation, or disassembly of this software
+ is permitted.
+ .
+ Limited patent license:
+ .
+ Texas Instruments Incorporated (“TI”) grants a world-wide, royalty-free,
+ non-exclusive license under patents it now or hereafter owns or controls
+ to make, have made, use, import, offer to sell and sell ("Utilize") this
+ software in its current form, but solely to the extent that any such
+ patent is necessary to Utilize the software alone. The patent license
+ shall not apply to any combinations which include this software. No
+ hardware per se is licensed hereunder.
+ .
+ DISCLAIMER:
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ .
+ Certain third party licenses not included:
+ .
+ Certain software may (a) require patent licenses from third parties
+ claiming patent rights covering implementation of the software or (b) be
+ based on industry recognized standards or software programs published by
+ industry recognized standards bodies and certain third parties may claim
+ to own patents or copyrights that cover implementation of those standards.
+ You acknowledge and agree that (i) this License does not convey a license
+ to any such third party patents and copyrights, (ii) you are responsible
+ for any fees or royalties that may be payable to any third party based on
+ such third party's interests in such software and (iii) you will indemnify
+ TI against your failure to make any such payments and will defend any
+ claim, suit or proceeding brought against TI insofar as such claim, suit
+ or proceeding is based on or arises from such failure.
+
+License: GPL-2+
+ 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 2 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 package; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
diff --git a/debian/dkms.conf.in b/debian/dkms.conf.in
new file mode 100644
index 0000000..777259a
--- /dev/null
+++ b/debian/dkms.conf.in
@@ -0,0 +1,8 @@
+PACKAGE_NAME="#DRIVERNAME#"
+PACKAGE_VERSION="#VERSION#"
+CLEAN="make clean"
+MAKE[0]="make all KVERSION=$kernelver"
+BUILT_MODULE_NAME[0]="omapdrm_pvr"
+DEST_MODULE_LOCATION[0]="/updates"
+AUTOINSTALL="yes"
+PATCH[0]="disable_pm_runtime_put_sync.patch"
diff --git a/debian/dkms/patches/disable_pm_runtime_put_sync.patch b/debian/dkms/patches/disable_pm_runtime_put_sync.patch
new file mode 100644
index 0000000..f150e82
--- /dev/null
+++ b/debian/dkms/patches/disable_pm_runtime_put_sync.patch
@@ -0,0 +1,17 @@
+Description: Workaround to avoid PM related issues with older kernel
+Forwarded: not-needed
+Author: Ricardo Salveti <rsalveti@linaro.org>
+
+diff --git a/services4/system/omap4/sysutils_linux.c b/services4/system/omap4/sysutils_linux.c
+index 3de5b16..b0d7ae7 100644
+--- a/services4/system/omap4/sysutils_linux.c
++++ b/services4/system/omap4/sysutils_linux.c
+@@ -202,7 +202,7 @@ IMG_VOID DisableSGXClocks(SYS_DATA *psSysData)
+
+ #if defined(LDM_PLATFORM) && !defined(PVR_DRI_DRM_NOT_PCI)
+ {
+- int res = pm_runtime_put_sync(&gpsPVRLDMDev->dev);
++ int res = 0; // XXX TL 3.1 pm_runtime_put_sync(&gpsPVRLDMDev->dev);
+ if (res < 0)
+ {
+ PVR_DPF((PVR_DBG_ERROR, "DisableSGXClocks: pm_runtime_put_sync failed (%d)", -res));
diff --git a/debian/pvr-omap4-dbg.dirs.in b/debian/pvr-omap4-dbg.dirs.in
new file mode 100644
index 0000000..ba64d0c
--- /dev/null
+++ b/debian/pvr-omap4-dbg.dirs.in
@@ -0,0 +1 @@
+#PKGDLIBDIR#
diff --git a/debian/pvr-omap4-dbg.install.in b/debian/pvr-omap4-dbg.install.in
new file mode 100644
index 0000000..9c67f5f
--- /dev/null
+++ b/debian/pvr-omap4-dbg.install.in
@@ -0,0 +1,2 @@
+usr/lib/debug/usr/lib/lib*.so* #PKGDLIBDIR#
+usr/lib/debug/usr/lib/xorg #PKGDLIBDIR#
diff --git a/debian/pvr-omap4-dbg.lintian-overrides b/debian/pvr-omap4-dbg.lintian-overrides
new file mode 100644
index 0000000..a4033dd
--- /dev/null
+++ b/debian/pvr-omap4-dbg.lintian-overrides
@@ -0,0 +1 @@
+unknown-section restricted/debug
diff --git a/debian/pvr-omap4-dev.dirs.in b/debian/pvr-omap4-dev.dirs.in
new file mode 100644
index 0000000..2391124
--- /dev/null
+++ b/debian/pvr-omap4-dev.dirs.in
@@ -0,0 +1 @@
+#PKGINCLUDEDIR#
diff --git a/debian/pvr-omap4-dev.install.in b/debian/pvr-omap4-dev.install.in
new file mode 100644
index 0000000..31d4b69
--- /dev/null
+++ b/debian/pvr-omap4-dev.install.in
@@ -0,0 +1 @@
+usr/include/* #PKGINCLUDEDIR#
diff --git a/debian/pvr-omap4-dev.lintian-overrides b/debian/pvr-omap4-dev.lintian-overrides
new file mode 100644
index 0000000..3719c11
--- /dev/null
+++ b/debian/pvr-omap4-dev.lintian-overrides
@@ -0,0 +1 @@
+unknown-section restricted/misc
diff --git a/debian/pvr-omap4.dirs.in b/debian/pvr-omap4.dirs.in
new file mode 100644
index 0000000..7e976b6
--- /dev/null
+++ b/debian/pvr-omap4.dirs.in
@@ -0,0 +1,2 @@
+#PKGLIBDIR#
+#PKGDATADIR#
diff --git a/debian/pvr-omap4.install.in b/debian/pvr-omap4.install.in
new file mode 100644
index 0000000..3ff1bea
--- /dev/null
+++ b/debian/pvr-omap4.install.in
@@ -0,0 +1,19 @@
+# Kernel module
+sgx/eurasiacon usr/src/#DRIVERNAME#-#VERSION#
+sgx/include4 usr/src/#DRIVERNAME#-#VERSION#
+sgx/services4 usr/src/#DRIVERNAME#-#VERSION#
+sgx/tools usr/src/#DRIVERNAME#-#VERSION#
+sgx/INSTALL usr/src/#DRIVERNAME#-#VERSION#
+sgx/README usr/src/#DRIVERNAME#-#VERSION#
+debian/Makefile usr/src/#DRIVERNAME#-#VERSION#
+debian/dkms.conf usr/src/#DRIVERNAME#-#VERSION#
+debian/dkms/* usr/src/#DRIVERNAME#-#VERSION#
+
+# Binaries
+usr/bin/* #PKGBINDIR#
+
+# Libraries
+usr/lib/lib*.so* #PKGLIBDIR#
+
+# Xorg Driver
+usr/lib/xorg #PKGLIBDIR#
diff --git a/debian/pvr-omap4.lintian-overrides b/debian/pvr-omap4.lintian-overrides
new file mode 100644
index 0000000..b906c39
--- /dev/null
+++ b/debian/pvr-omap4.lintian-overrides
@@ -0,0 +1,4 @@
+unknown-section restricted/misc
+postinst-has-useless-call-to-ldconfig
+prerm-calls-ldconfig
+postrm-has-useless-call-to-ldconfig
diff --git a/debian/pvr-omap4.postinst.in b/debian/pvr-omap4.postinst.in
new file mode 100644
index 0000000..fa510e8
--- /dev/null
+++ b/debian/pvr-omap4.postinst.in
@@ -0,0 +1,62 @@
+#!/bin/sh
+# Copyright (C) 2007 Mario Limonciello
+# Copyright (C) 2009-2011 Canonical Ltd.
+# Copyright (C) 2012 Linaro Ltd.
+
+set -e
+
+PACKAGE_NAME=#DRIVERNAME#
+MODULE_NAME=omapdrm_pvr
+CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
+
+INIT_SCRIPT="/etc/init/build-$PACKAGE_NAME.conf"
+
+ARCH=`dpkg --print-architecture`
+
+if [ "$1" = "configure" ]; then
+
+ update-alternatives --force \
+ --install /#SYSCONFDIR#/ld.so.conf.d/#DEB_HOST_MULTIARCH#_EGL.conf #DEB_HOST_MULTIARCH#_egl_conf /#LDSOCONF# #ALTPRIORITY# \
+ --slave /#BINDIR#/xeglinfo #DEB_HOST_MULTIARCH#_xeglinfo /#PKGBINDIR#/xeglinfo \
+ --slave /#BINDIR#/xgles1test1 #DEB_HOST_MULTIARCH#_xgles1test1 /#PKGBINDIR#/xgles1test1 \
+ --slave /#BINDIR#/xgles2test1 #DEB_HOST_MULTIARCH#_xgles2test1 /#PKGBINDIR#/xgles2test1 \
+ --slave /#BINDIR#/xmultiegltest #DEB_HOST_MULTIARCH#_xmultiegltest /#PKGBINDIR#/xmultiegltest \
+ --slave /#BINDIR#/xovg_unit_test #DEB_HOST_MULTIARCH#_xovg_unit_test /#PKGBINDIR#/xovg_unit_test \
+ --slave /#LIBDIR#/xorg/modules/drivers/pvr_drv.so #DEB_HOST_MULTIARCH#_pvr_drv /#PKGLIBDIR#/xorg/modules/drivers/pvr_drv.so
+
+ # ldconfig needs to be run immediately as we're changing /etc/ld.so.conf.d/ with
+ # alternatives.
+ LDCONFIG_NOTRIGGER=y ldconfig
+
+ # Trigger gmenu so that the icons will show up in the menu
+ dpkg-trigger --by-package=$PACKAGE_NAME gmenucache || true
+
+ # If the delayed module build feature is enabled
+ # i.e. if $DONT_BUILD_MODULE is set to 1
+ if [ "${DONT_BUILD_MODULE}1" -eq "11" ]; then
+ # Do not build the module and create
+ # the Upstart script which will
+ # build the module on next boot
+ cat > $INIT_SCRIPT <<EOF
+# Warning: This file is autogenerated by $PACKAGE_NAME. All changes to this file will be lost.
+start on (starting oem-config
+ or starting lightdm
+ or starting gdm
+ or starting kdm
+ or starting xdm
+ or starting uxlaunch)
+task
+
+script
+ dkms add -m $PACKAGE_NAME -v $CVERSION
+ /usr/lib/dkms/dkms_autoinstaller start || ( rm -f $INIT_SCRIPT && exit 1 )
+ modprobe $MODULE_NAME || true
+ rm -f $INIT_SCRIPT
+end script
+EOF
+ else
+ /usr/lib/dkms/common.postinst $PACKAGE_NAME $CVERSION /usr/share/$PACKAGE_NAME $ARCH $2
+ fi
+fi
+
+#DEBHELPER#
diff --git a/debian/pvr-omap4.postrm.in b/debian/pvr-omap4.postrm.in
new file mode 100644
index 0000000..f6e33b9
--- /dev/null
+++ b/debian/pvr-omap4.postrm.in
@@ -0,0 +1,49 @@
+#! /bin/sh
+# postrm script pvr-omap4
+#
+# see: dh_installdeb(1)
+#
+# Copyright (C) 2007 Mario Limonciello
+# Copyright (C) 2009-2011 Canonical Ltd.
+# Copyright (C) 2012 Linaro Ltd.
+
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see /usr/share/doc/packaging-manual/
+
+PKGNAME=#DRIVERNAME#
+
+case "$1" in
+ remove|purge)
+
+ if [ "$1" = "purge" ]; then
+ rm -Rf /#PKGLIBDIR#
+ else
+ # This will preserve the etc directory
+ rm -f /#PKGLIBDIR#/* 2>/dev/null || true
+ fi
+
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
diff --git a/debian/pvr-omap4.prerm.in b/debian/pvr-omap4.prerm.in
new file mode 100644
index 0000000..a6f0918
--- /dev/null
+++ b/debian/pvr-omap4.prerm.in
@@ -0,0 +1,36 @@
+#!/bin/sh
+# prerm script for pvr-omap4
+#
+# Copyright (C) 2007 Mario Limonciello
+# Copyright (C) 2009-2011 Canonical Ltd.
+# Copyright (C) 2012 Linaro Ltd.
+
+set -e
+
+PACKAGE_NAME=#DRIVERNAME#
+CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
+
+remove_dkms_module() {
+ echo "Removing all DKMS Modules"
+ dkms remove -m $PACKAGE_NAME -v $CVERSION --all > /dev/null
+ echo "Done."
+}
+
+case "$1" in
+ upgrade)
+ remove_dkms_module
+ ;;
+ remove)
+ remove_dkms_module
+
+ update-alternatives --remove #DEB_HOST_MULTIARCH#_egl_conf /#LDSOCONF#
+
+ # Trigger gmenu so as to update the gnome menu
+ dpkg-trigger --by-package=$PACKAGE_NAME gmenucache || true
+
+ # explicit ldconfig due to alternatives
+ LDCONFIG_NOTRIGGER=y ldconfig
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..23b6022
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,138 @@
+#!/usr/bin/make -f
+# Copyright (C) 2002-2005 Flavio Stanchina
+# Copyright (C) 2005-2006 Aric Cyr
+# Copyright (C) 2007-2010 Mario Limonciello
+# Copyright (C) 2009-2011 Canonical Ltd.
+# Copyright (C) 2012 Linaro Ltd.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# Package names
+PKG_driver := pvr-omap4
+PKG_driver_dev := pvr-omap4-dev
+PKG_driver_dbg := pvr-omap4-dbg
+PKG_module := $(shell echo "$(PKG_driver)" | sed s/\-/_/g)
+PKG_version := $(shell dpkg-parsechangelog | awk -F' ' '/^Version:/ {print $$2}' | awk -F- '{print $$1}')
+PKG_source := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
+PKG_module := $(shell echo "$(PKG_driver)" | sed s/\-/_/g)
+
+VIDEODEP = $(shell cat /usr/share/xserver-xorg/videodrvdep 2>/dev/null)
+VIDDRIVER_PROVIDES = xorg-driver-video
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+# Priority of the alternatives
+alt_priority := 1000
+
+# Directory naming schemes
+PKG_dirname := $(PKG_driver)-egl
+bindir := usr/bin
+datadir := usr/share
+PKG_datadir := $(datadir)/$(PKG_dirname)
+libdir := usr/lib
+dlibdir := usr/lib/debug
+includedir := usr/include
+sysconfdir := etc
+PKG_libdir := $(libdir)/$(PKG_dirname)
+PKG_dlibdir := $(dlibdir)/$(PKG_libdir)
+xorg_libdir := $(libdir)/xorg
+PKG_driversdir := $(PKG_libdir)/xorg
+PKG_bindir := $(PKG_libdir)/bin
+PKG_configdir := $(PKG_libdir)
+PKG_includedir := $(PKG_libdir)/include
+ld_so_conf_dir := $(PKG_configdir)
+ld_so_conf_file := ld.so.conf
+alt_ld_so_conf_file := alt_ld.so.conf
+ld_so_conf_path := $(ld_so_conf_dir)/$(ld_so_conf_file)
+alt_ld_so_conf_path := $(ld_so_conf_dir)/$(alt_ld_so_conf_file)
+mandir := usr/share/man/man1
+PKG_bugdir := usr/share/bug/$(PKG_dirname)
+autostartdir := etc/xdg/autostart
+PKG_autostartdir := $(PKG_configdir)
+PKG_xmoddir := $(PKG_libdir)/xorg/modules
+
+# This makes sure that the xserver ABI is bumped to match the current one when the
+# packages are built
+.PHONY: serverabi
+serverabi:
+ifeq ($(VIDEODEP),)
+ @echo 'error: xserver-xorg-dev >= 1.7.6.901 needs to be installed'
+ @exit 1
+else
+ echo "xviddriver:Depends=$(VIDEODEP)" >> debian/$(PKG_driver).substvars
+endif
+
+build:
+ # Fill in important variables
+ for i in dkms.conf \
+ $(PKG_driver).dirs \
+ $(PKG_driver).install \
+ $(PKG_driver).postinst \
+ $(PKG_driver).postrm \
+ $(PKG_driver).prerm \
+ $(PKG_driver_dbg).dirs \
+ $(PKG_driver_dbg).install \
+ $(PKG_driver_dev).dirs \
+ $(PKG_driver_dev).install; do \
+ sed -e "s|#PKGXMODDIR#|$(PKG_xmoddir)|g" \
+ -e "s|#LIBDIR#|$(libdir)|g" \
+ -e "s|#BINDIR#|$(bindir)|g" \
+ -e "s|#SYSCONFDIR#|$(sysconfdir)|g" \
+ -e "s|#MANDIR#|$(mandir)|g" \
+ -e "s|#LDSOCONF#|$(ld_so_conf_path)|g" \
+ -e "s|#ALTLDSOCONF#|$(alt_ld_so_conf_path)|g" \
+ -e "s|#ALTPRIORITY#|$(alt_priority)|g" \
+ -e "s|#AUTOSTARTDIR#|$(autostartdir)|g" \
+ -e "s|#DATADIR#|$(datadir)|g" \
+ -e "s|#PKGDATADIR#|$(PKG_datadir)|g" \
+ -e "s|#PKGCONFIGDIR#|$(PKG_configdir)|g" \
+ -e "s|#PKGBINDIR#|$(PKG_bindir)|g" \
+ -e "s|#PKGLIBDIR#|$(PKG_libdir)|g" \
+ -e "s|#PKGDLIBDIR#|$(PKG_dlibdir)|g" \
+ -e "s|#PKGDRIVERSDIR#|$(PKG_driversdir)|g" \
+ -e "s|#DRIVERNAME#|$(PKG_driver)|g" \
+ -e "s|#DRIVERDEVNAME#|$(PKG_driver_dev)|g" \
+ -e "s|#DRIVERSRCNAME#|$(PKG_source)|g" \
+ -e "s|#VERSION#|$(PKG_version)|g" \
+ -e "s|#INCLUDEDIR#|$(includedir)|g" \
+ -e "s|#PKGINCLUDEDIR#|$(PKG_includedir)|g" \
+ -e "s|#PKGXMODDIR#|$(PKG_xmoddir)|g" \
+ -e "s|#SRCARCH#|$(SRC_arch)|g" \
+ -e "s|#DEB_HOST_MULTIARCH#|$(DEB_HOST_MULTIARCH)|g" \
+ debian/$$i.in > debian/$$i; \
+ done
+
+ # file permission are a mess from orig tarball, fixing it
+ find sgx -type f -exec chmod -x {} +
+ chmod +x sgx/eurasiacon/build/linux2/tools/cc-check.sh
+
+ # remove rpath from the binaries and libraries
+ find usr/bin -type f -exec chrpath -d {} +
+ find usr/lib -maxdepth 1 -iname "*.so*" -type f -exec chrpath -d {} +
+ chrpath -d usr/lib/xorg/modules/drivers/pvr_drv.so
+
+ dh build
+
+binary-arch:
+ dh_installdirs -p$(PKG_driver)
+ dh_installdirs -p$(PKG_driver_dbg)
+ dh_installdirs -p$(PKG_driver_dev)
+
+ # ld.so.conf
+ echo "/$(PKG_libdir)" > "$(CURDIR)/debian/$(PKG_driver)/$(ld_so_conf_path)"
+
+ # empty ld.so.conf for the fake multi-arch alternative
+ echo "" > "$(CURDIR)/debian/$(PKG_driver)/$(alt_ld_so_conf_path)"
+
+ dh binary-arch
+
+binary: binary-arch binary-indep;
+ # Run the normal stuff
+ dh binary
+
+override_dh_shlibdeps:
+ dh_shlibdeps -l$(CURDIR)/debian/$(PKG_driver)/$(PKG_libdir)
+
+%:
+ dh $@
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..dd4652f
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://ppa.launchpad.net/tiomap-dev/release/ubuntu/pool/main/p/pvr-omap4/pvr-omap4_(.+).orig.tar.gz