diff -Naur avr-libc-1_2-branch/avr-libc.spec.in avr-libc/avr-libc.spec.in
--- avr-libc-1_2-branch/avr-libc.spec.in	2004-11-02 08:01:29.000000000 -0800
+++ avr-libc/avr-libc.spec.in	2005-11-14 21:59:24.000000000 -0800
@@ -51,17 +51,19 @@
 Name: avr-libc
 Version: %{libc_version}
 Release: 1
-Copyright: BSD
+License: BSD
 Group: Avr/Development/Tools
 URL: http://savannah.gnu.org/projects/avr-libc
 Source0: http://savannah.gnu.org/download/avr-libc/avr-libc-%{version}.tar.gz
 Buildroot: /var/tmp/avr-libc-%{version}-root
 BuildRequires: gzip avr-gcc >= 3.3
 %if %{_with_docs}
-BuildRequires: doxygen >= 1.3.4 tetex
+BuildRequires: doxygen >= 1.3.4 tetex transfig
 %endif
 Requires: avr-gcc >= 3.3
 
+%define ourdocdir %{_docdir}/%{name}-%{version}
+
 %description
 Avr-libc is a C library for developing applications for Atmel AVR
 microcontrollers.
@@ -98,9 +100,25 @@
 make prefix=$RPM_BUILD_ROOT%{_prefix} mandir=$RPM_BUILD_ROOT%{_mandir} \
 	infodir=$RPM_BUILD_ROOT%{_infodir} install
 
+# Move/copy files to appropriate directory to workaround the fact that the doc
+# directive will delete files that are already installed.
+cd ..
+%if ! %{_with_docs}
+mkdir -p $RPM_BUILD_ROOT%{ourdocdir}
+%endif
+cp AUTHORS ChangeLog* INSTALL LICENSE NEWS README $RPM_BUILD_ROOT%{ourdocdir}
+cp --parents doc/INSTALL doc/TODO $RPM_BUILD_ROOT%{ourdocdir}
+cp --parents doc/examples/demo/Makefile $RPM_BUILD_ROOT%{ourdocdir}
+cp --parents doc/examples/demo/demo.c $RPM_BUILD_ROOT%{ourdocdir}
+cp --parents doc/examples/demo/demo.fig $RPM_BUILD_ROOT%{ourdocdir}
+
 %if %{_with_docs}
-gzip -9 doc/api/*.ps
-gzip -9 doc/api/*.pdf
+# Try to remove bogus man pages.
+rm -f ${RPM_BUILD_ROOT}%{ourdocdir}/man/man3/*_BUILD_*.3
+gzip -9 ${RPM_BUILD_ROOT}%{ourdocdir}/man/man3/*.3
+%else
+## Don't need man script if we aren't installing man pages.
+rm ${RPM_BUILD_ROOT}%{_bindir}/avr-man
 %endif
 
 %clean
@@ -108,12 +126,14 @@
 
 %files
 %defattr(-,root,root)
-%doc AUTHORS ChangeLog INSTALL LICENSE NEWS README
-%doc doc/CHANGES.old doc/ChangeLog doc/INSTALL doc/TODO
-%doc doc/avr-libc-reference.html
-#%doc doc/examples/*.c doc/examples/*.h doc/examples/*.s doc/examples/prg
-%doc doc/examples/demo/Makefile doc/examples/demo/demo.c
-%doc doc/examples/demo/demo.fig
+%docdir %{ourdocdir}
+%{ourdocdir}/AUTHORS
+%{ourdocdir}/ChangeLog*
+%{ourdocdir}/INSTALL
+%{ourdocdir}/LICENSE
+%{ourdocdir}/NEWS
+%{ourdocdir}/README
+%{ourdocdir}/doc
 %dir %{_prefix}/avr
 %dir %{_prefix}/avr/lib
 %dir %{_prefix}/avr/lib/avr3
@@ -121,6 +141,7 @@
 %dir %{_prefix}/avr/lib/avr5
 %dir %{_prefix}/avr/include
 %dir %{_prefix}/avr/include/avr
+%dir %{_prefix}/avr/include/compat
 %{_prefix}/avr/lib/lib*
 %{_prefix}/avr/lib/crt*
 %{_prefix}/avr/lib/avr3/lib*
@@ -131,6 +152,7 @@
 %{_prefix}/avr/lib/avr5/crt*
 %{_prefix}/avr/include/*.h
 %{_prefix}/avr/include/avr/*.h
+%{_prefix}/avr/include/compat/*.h
 
 ## TRoth/20021013: Argh! Why does the fscking %doc directive remove the doc
 ## dir? That's absolutely stupid. We install things there _assuming_ they
@@ -140,12 +162,17 @@
 %if %{_with_docs}
 %files docs
 %defattr(-,root,root)
-%doc obj-%{_target_platform}/doc/api/avr-libc-user-manual
-%doc obj-%{_target_platform}/doc/api/avr-libc-user-manual.ps.gz
-%doc obj-%{_target_platform}/doc/api/avr-libc-user-manual.pdf.gz
+%{_bindir}/avr-man
+%doc %{ourdocdir}/avr-libc-user-manual
+%doc %{ourdocdir}/avr-libc-user-manual.ps
+%doc %{ourdocdir}/avr-libc-user-manual.pdf
+%doc %{ourdocdir}/man
 %endif
 
 %changelog
+* Mon Nov 14 2005 Galen Seitz <galens@seitzassoc.com>
+- Updated to work with latest tools and build procedure.
+
 * Tue Oct 21 2003 Theodore Roth <troth@openavr.org>
 - Allow disabling build of docs sub-package with "--without docs".
 
diff -Naur avr-libc-1_2-branch/configure.in avr-libc/configure.in
--- avr-libc-1_2-branch/configure.in	2005-11-11 12:12:50.000000000 -0800
+++ avr-libc/configure.in	2005-11-14 21:57:24.000000000 -0800
@@ -275,11 +275,10 @@
 
 if test "$versioned_doc" = "yes"; then
 	DOC_INST_DIR='${DESTDIR}${datadir}/doc/avr-libc-$(VERSION)'
-	AVR_LIBC_USER_MANUAL="avr-libc-user-manual-${VERSION}"
 else
 	DOC_INST_DIR='${DESTDIR}${datadir}/doc/avr-libc'
-	AVR_LIBC_USER_MANUAL="avr-libc-user-manual"
 fi
+AVR_LIBC_USER_MANUAL="avr-libc-user-manual"
 
 dnl Define this here so all files agree on the name of the manual.
 dnl This also centralizes the name so it's easier to change.
