File 0005-Convert-hda-verb-to-use-automake.patch of Package alsa-tools
From 2996581ce2c2131804a5766a8bb6995e674965b8 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Fri, 20 Apr 2012 15:54:49 +0200
Subject: [PATCH] Convert hda-verb to use automake
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
hda-verb/Makefile | 15 ---------------
hda-verb/Makefile.am | 12 ++++++++++++
hda-verb/configure.ac | 7 +++++++
hda-verb/gitcompile | 13 +++++++++++++
4 files changed, 32 insertions(+), 15 deletions(-)
delete mode 100644 hda-verb/Makefile
create mode 100644 hda-verb/Makefile.am
create mode 100644 hda-verb/configure.ac
create mode 100755 hda-verb/gitcompile
diff --git a/hda-verb/Makefile b/hda-verb/Makefile
deleted file mode 100644
index 260831a..0000000
--- a/hda-verb/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-VERSION = 0.4
-
-CC = gcc
-CFLAGS = -Wall -O2 -g
-
-hda-verb: hda-verb.o
- $(CC) -o $@ hda-verb.o
-
-clean:
- rm -f hda-verb *.o
-
-dist:
- cd ..; mv hda-verb hda-verb-$(VERSION); \
- tar cfz hda-verb-$(VERSION).tar.gz --exclude='.git*' hda-verb-$(VERSION); \
- mv hda-verb-$(VERSION) hda-verb
diff --git a/hda-verb/Makefile.am b/hda-verb/Makefile.am
new file mode 100644
index 0000000..7dab1d9
--- /dev/null
+++ b/hda-verb/Makefile.am
@@ -0,0 +1,12 @@
+AUTOMAKE_OPTIONS = 1.3 foreign
+bin_PROGRAMS = hda-verb
+hda_verb_SOURCES = hda-verb.c
+noinst_HEADERS = hda_hwdep.h
+
+EXTRA_DIST = gitcompile README ChangeLog
+
+alsa-dist: distdir
+ @rm -rf ../distdir/$(MYNAME)
+ @mkdir -p ../distdir/$(MYNAME)
+ @cp -RLpv $(distdir)/* ../distdir/$(MYNAME)
+ @rm -rf $(distdir)
diff --git a/hda-verb/configure.ac b/hda-verb/configure.ac
new file mode 100644
index 0000000..94ca73b
--- /dev/null
+++ b/hda-verb/configure.ac
@@ -0,0 +1,7 @@
+AC_INIT(hda-verb.c)
+AM_INIT_AUTOMAKE(hda-verb, 0.4)
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_HEADER_STDC
+
+AC_OUTPUT(Makefile)
diff --git a/hda-verb/gitcompile b/hda-verb/gitcompile
new file mode 100755
index 0000000..58328bd
--- /dev/null
+++ b/hda-verb/gitcompile
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+aclocal $ACLOCAL_FLAGS || exit 1
+automake --foreign --add-missing || exit 1
+autoconf || exit 1
+export CFLAGS='-O2 -Wall -pipe -g'
+echo "CFLAGS=$CFLAGS"
+echo "./configure $@"
+./configure $@ || exit 1
+unset CFLAGS
+if [ -z "$GITCOMPILE_NO_MAKE" ]; then
+ make || exit 1
+fi
--
1.7.9.2