gnomeos: Work on updating udev
This commit is contained in:
parent
e8b5ffed22
commit
973a8f6cdf
|
|
@ -0,0 +1,128 @@
|
|||
From 9af4741c11d3ce138886dd8707b3e97e1e570edd Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Sun, 8 Jan 2012 17:17:40 -0500
|
||||
Subject: [PATCH] Add a configure script to implement GNOME Build API
|
||||
|
||||
See http://people.gnome.org/~walters/docs/build-api.txt
|
||||
|
||||
This also required modifying the install rule to honor DESTDIR.
|
||||
---
|
||||
Makefile | 22 +++++---------------
|
||||
configure | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 69 insertions(+), 16 deletions(-)
|
||||
create mode 100755 configure
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index efb0cc1..e360181 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -3,17 +3,7 @@ VERSION=$(shell awk '/Version:/ { print $$2 }' hwdata.spec)
|
||||
RELEASE=$(shell rpm -q --specfile --qf "%{release}" hwdata.spec)
|
||||
SOURCEDIR := $(shell pwd)
|
||||
|
||||
-prefix=$(DESTDIR)/usr
|
||||
-sysconfdir=$(DESTDIR)/etc
|
||||
-bindir=$(prefix)/bin
|
||||
-sbindir=$(prefix)/sbin
|
||||
-datadir=$(prefix)/share
|
||||
-mandir=$(datadir)/man
|
||||
-includedir=$(prefix)/include
|
||||
-libdir=$(prefix)/lib
|
||||
-
|
||||
-CC=gcc
|
||||
-CFLAGS=$(RPM_OPT_FLAGS) -g
|
||||
+include Makefile.inc
|
||||
|
||||
CVSROOT = $(shell cat CVS/Root 2>/dev/null || :)
|
||||
|
||||
@@ -26,13 +16,13 @@ FILES = pci.ids upgradelist usb.ids oui.txt pnp.ids
|
||||
all:
|
||||
|
||||
install:
|
||||
- mkdir -p -m 755 $(datadir)/$(NAME)
|
||||
+ mkdir -p -m 755 $(DESTDIR)$(datadir)/$(NAME)
|
||||
for foo in $(FILES) ; do \
|
||||
- install -m 644 $$foo $(datadir)/$(NAME) ;\
|
||||
+ install -m 644 $(srcdir)/$$foo $(DESTDIR)$(datadir)/$(NAME) ;\
|
||||
done
|
||||
- mkdir -p -m 755 $(datadir)/$(NAME)/videoaliases
|
||||
- mkdir -p -m 755 $(sysconfdir)/modprobe.d
|
||||
- install -m 644 blacklist.conf $(sysconfdir)/modprobe.d
|
||||
+ mkdir -p -m 755 $(DESTDIR)$(datadir)/$(NAME)/videoaliases
|
||||
+ mkdir -p -m 755 $(DESTDIR)$(sysconfdir)/modprobe.d
|
||||
+ install -m 644 $(srcdir)/blacklist.conf $(DESTDIR)$(sysconfdir)/modprobe.d
|
||||
|
||||
commit:
|
||||
git commit -a ||:
|
||||
diff --git a/configure b/configure
|
||||
new file mode 100755
|
||||
index 0000000..5f87c77
|
||||
--- /dev/null
|
||||
+++ b/configure
|
||||
@@ -0,0 +1,63 @@
|
||||
+#!/bin/bash
|
||||
+# -*- mode: sh -*-
|
||||
+# Minimal configure script which writes out a Makefile.inc
|
||||
+# Copyright 2010, 2011 Colin Walters <walters@verbum.org>
|
||||
+# Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php)
|
||||
+
|
||||
+prefix=/usr
|
||||
+
|
||||
+# Little helper function for reading args from the commandline.
|
||||
+# it automatically handles -a b and -a=b variants, and returns 1 if
|
||||
+# we need to shift $3.
|
||||
+read_arg() {
|
||||
+ # $1 = arg name
|
||||
+ # $2 = arg value
|
||||
+ # $3 = arg parameter
|
||||
+ local rematch='^[^=]*=(.*)$'
|
||||
+ if [[ $2 =~ $rematch ]]; then
|
||||
+ read "$1" <<< "${BASH_REMATCH[1]}"
|
||||
+ else
|
||||
+ read "$1" <<< "$3"
|
||||
+ # There is no way to shift our callers args, so
|
||||
+ # return 1 to indicate they should do it instead.
|
||||
+ return 1
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+while (($# > 0)); do
|
||||
+ case "${1%%=*}" in
|
||||
+ --prefix) read_arg prefix "$@" || shift;;
|
||||
+ --bindir) read_arg bindir "$@" || shift;;
|
||||
+ --sbindir) read_arg sbindir "$@" || shift;;
|
||||
+ --libexecdir) read_arg libexecdir "$@" || shift;;
|
||||
+ --datarootdir) read_arg datarootdir "$@" || shift;;
|
||||
+ --datadir) read_arg datadir "$@" || shift;;
|
||||
+ --sysconfdir) read_arg sysconfdir "$@" || shift;;
|
||||
+ --libdir) read_arg libdir "$@" || shift;;
|
||||
+ --mandir) read_arg mandir "$@" || shift;;
|
||||
+ *) echo "Ignoring unknown option '$1'";;
|
||||
+ esac
|
||||
+ shift
|
||||
+done
|
||||
+
|
||||
+# Handle srcdir != builddir
|
||||
+srcdir=$(dirname $0)
|
||||
+if ! test -f Makefile; then
|
||||
+ ln -s ${srcdir}/Makefile Makefile
|
||||
+fi
|
||||
+
|
||||
+cat > Makefile.inc.tmp <<EOF
|
||||
+srcdir = ${srcdir}
|
||||
+
|
||||
+prefix ?= ${prefix}
|
||||
+bindir ?= ${bindir:-${prefix}/bin}
|
||||
+sbindir ?= ${sbindir:-${prefix}/sbin}
|
||||
+libexecdir ?= ${libexecdir:-${prefix}/libexec}
|
||||
+datarootdir ?= ${datarootdir:-${prefix}/share}
|
||||
+datadir ?= ${datadir:-${datarootdir}}
|
||||
+sysconfdir ?= ${sysconfdir:-${prefix}/etc}
|
||||
+libdir ?= ${libdir:-${prefix}/lib}
|
||||
+mandir ?= ${mandir:-${prefix}/share/man}
|
||||
+
|
||||
+EOF
|
||||
+mv Makefile.inc.tmp Makefile.inc
|
||||
--
|
||||
1.7.6.4
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From 2fedb360a7b1c8a836ef6aa6cebe818033fb44b3 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Sun, 8 Jan 2012 16:50:12 -0500
|
||||
Subject: [PATCH] autogen.sh: Honor NOCONFIGURE environment variable
|
||||
|
||||
See http://people.gnome.org/~walters/docs/build-api.txt
|
||||
---
|
||||
autogen.sh | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/autogen.sh b/autogen.sh
|
||||
index d5c6a19..0d6a23d 100755
|
||||
--- a/autogen.sh
|
||||
+++ b/autogen.sh
|
||||
@@ -8,5 +8,7 @@ aclocal || exit 1
|
||||
autoheader || exit 1
|
||||
autoconf || exit 1
|
||||
automake -a -c || exit 1
|
||||
-./configure --enable-maintainer-mode --enable-debug-log \
|
||||
+if test -z "$NOCONFIGURE"; then
|
||||
+ ./configure --enable-maintainer-mode --enable-debug-log \
|
||||
--enable-examples-build $*
|
||||
+fi
|
||||
--
|
||||
1.7.6.4
|
||||
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
"fd": "git:git://anongit.freedesktop.org/git/",
|
||||
"fd-dbus": "git:git://anongit.freedesktop.org/git/dbus/",
|
||||
"fd-NM": "git:git://anongit.freedesktop.org/git/NetworkManager/",
|
||||
"fedora": "git:git://git.fedorahosted.org/",
|
||||
"cgwalters": "git:git://github.com/cgwalters/"},
|
||||
|
||||
"components": [
|
||||
|
|
@ -255,6 +256,21 @@
|
|||
"component": "devel"},
|
||||
|
||||
{"src": "gnome:gobject-introspection"},
|
||||
|
||||
{"src": "git:git://git.libusb.org/libusb.git",
|
||||
"branch": "v1.0.8",
|
||||
"patches": ["libusb-autogen.patch"]},
|
||||
|
||||
{"src": "git:git://github.com/gregkh/usbutils.git",
|
||||
"branch": "v005",
|
||||
"patches": ["usbutils-autogen.patch"]},
|
||||
|
||||
{"src": "fedora:hwdata.git",
|
||||
"patches": ["hwdata-buildapi.patch"]},
|
||||
|
||||
{"src": "git:git://git.kernel.org/pub/scm/linux/hotplug/udev.git",
|
||||
"branch": "175",
|
||||
"patches": ["udev-autogen.patch"]},
|
||||
|
||||
{"src": "cgwalters:expat-git-mirror.git",
|
||||
"patches": ["expat-autogen.patch"]},
|
||||
|
|
@ -271,7 +287,7 @@
|
|||
|
||||
{"src": "git:git://git.infradead.org/users/tgr/libnl.git",
|
||||
"name": "libnl3",
|
||||
"branch": "libnl3_1"},
|
||||
"branch": "libnl3_1"},
|
||||
|
||||
{"src": "fd-NM:NetworkManager",
|
||||
"config-opts": ["--with-distro=generic"],
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
From e87b015ab1f2ff755bd669891d9c37b7e112b7e2 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Sun, 8 Jan 2012 15:32:49 -0500
|
||||
Subject: [PATCH] autogen.sh: Honor NOCONFIGURE envrionment variable
|
||||
|
||||
http://people.gnome.org/~walters/docs/build-api.txt
|
||||
---
|
||||
autogen.sh | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/autogen.sh b/autogen.sh
|
||||
index b6ffee7..af056a1 100755
|
||||
--- a/autogen.sh
|
||||
+++ b/autogen.sh
|
||||
@@ -31,4 +31,6 @@ args="--prefix=/usr \
|
||||
--with-selinux \
|
||||
--enable-gtk-doc"
|
||||
|
||||
-./configure $args CFLAGS="${CFLAGS} ${MYCFLAGS}" $@
|
||||
+if test -z "$NOCONFIGURE"; then
|
||||
+ ./configure $args CFLAGS="${CFLAGS} ${MYCFLAGS}" $@
|
||||
+fi
|
||||
--
|
||||
1.7.6.4
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
From f93dd8b7955010289b6116604798360fc735a996 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Sun, 8 Jan 2012 16:57:39 -0500
|
||||
Subject: [PATCH] autogen.sh: Honor NOCONFIGURE=1 environment variable
|
||||
|
||||
See http://people.gnome.org/~walters/docs/build-api.txt
|
||||
---
|
||||
autogen.sh | 6 ++++--
|
||||
1 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/autogen.sh b/autogen.sh
|
||||
index 2e7bfc5..e15a8c2 100755
|
||||
--- a/autogen.sh
|
||||
+++ b/autogen.sh
|
||||
@@ -35,5 +35,7 @@ args="--prefix=/usr \
|
||||
--with-selinux \
|
||||
--enable-gtk-doc"
|
||||
|
||||
-export CFLAGS="$CFLAGS $MYCFLAGS"
|
||||
-./configure $args $@
|
||||
+if test -z "$NOCONFIGURE"; then
|
||||
+ export CFLAGS="$CFLAGS $MYCFLAGS"
|
||||
+ ./configure $args $@
|
||||
+fi
|
||||
--
|
||||
1.7.6.4
|
||||
|
||||
Loading…
Reference in New Issue