From bc8d778632b8b9b384c0dbb605a5c74d45f11911 Mon Sep 17 00:00:00 2001
From: troth <troth@81a1dc3b-b13d-400b-aceb-764788c761c2>
Date: Thu, 27 Feb 2003 06:56:03 +0000
Subject: [PATCH] * Makefile.am (EXTRA_DIST): Add avrdude.spec and make entries
 one per 	line so future patches are obvious as to what changed. *
 avrdude.spec.in: New file to support creation of binaries in rpm format. *
 configure.ac (AC_OUTPUT): Add avrdude.spec. 	Reorder so that Makefile is
 the last entry.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@240 81a1dc3b-b13d-400b-aceb-764788c761c2
---
 Makefile.am     |  6 +++++-
 avrdude.spec.in | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac    |  3 ++-
 3 files changed, 58 insertions(+), 2 deletions(-)
 create mode 100644 avrdude.spec.in

diff --git a/Makefile.am b/Makefile.am
index 118ac05b..76d6c6ec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,11 @@
 # $Id$
 #
 
-EXTRA_DIST   = avrdude.1 avrdude.pdf avrdude.conf.in bootstrap
+EXTRA_DIST   = \
+	avrdude.1 \
+	avrdude.pdf \
+	avrdude.spec \
+	bootstrap
 
 SUBDIRS      = @WINDOWS_DIRS@
 DIST_SUBDIRS = windows
diff --git a/avrdude.spec.in b/avrdude.spec.in
new file mode 100644
index 00000000..06b14427
--- /dev/null
+++ b/avrdude.spec.in
@@ -0,0 +1,51 @@
+## -*- mode: rpm-spec; -*-
+##
+## $Id$
+##
+## @configure_input@
+##
+
+Summary: AVRDUDE is software for programming Atmel AVR Microcontrollers.
+Name: avrdude
+Version: @VERSION@
+Release: 1
+URL: http://savannah.nongnu.org/projects/avrdude
+Source0: %{name}-%{version}.tar.gz
+License: GPL
+Group: Development/Tools
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+%description
+AVRDUDE is software for programming Atmel AVR Microcontrollers.
+
+%prep
+%setup -q
+
+%build
+
+./configure --prefix=%{_prefix} --sysconfdir=/etc --mandir=%{_mandir}
+
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make prefix=$RPM_BUILD_ROOT%{_prefix} \
+	sysconfdir=$RPM_BUILD_ROOT/etc \
+	mandir=$RPM_BUILD_ROOT%{_mandir} \
+	install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%{_prefix}/bin/avrdude
+%{_mandir}/man1/avrdude.1.gz
+%attr(0644,root,root)   %config /etc/avrdude.conf
+
+
+%changelog
+* Wed Feb 26 2003 Theodore A. Roth <troth@openavr.org>
+- Initial build.
+
+
diff --git a/configure.ac b/configure.ac
index d93aeabf..856bac4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,7 +113,8 @@ AC_SUBST(WINDOWS_DIRS,$WINDOWS_DIRS)
 
 AC_CONFIG_FILES([
 	windows/Makefile
-	Makefile
+	avrdude.spec
 	avrdude.conf
+	Makefile
 ])
 AC_OUTPUT