65988d3
 # FORCE NOARCH
d6e6772
# This package is noarch intentionally, although it supplies binaries,
d6e6772
# as they're not intended for the build platform, but for AVR.
d6e6772
# The related discussion can be found here:
b582eba
# https://www.redhat.com/archives/fedora-devel-list/2009-February/msg02261.html
d6e6772
%global _binaries_in_noarch_packages_terminate_build 0
d6e6772
2e52358
Name:           avr-libc
9a10aba
Version:        1.8.0
fa9e29f
Release:        10%{?dist}
2e52358
Summary:        C library for use with GCC on Atmel AVR microcontrollers
2e52358
Group:          Development/Tools
2e52358
License:        BSD
2e52358
URL:            http://www.nongnu.org/avr-libc/
2e52358
Source0:        http://download.savannah.gnu.org/releases/avr-libc/avr-libc-%{version}.tar.bz2
44df907
Source1:        http://download.savannah.gnu.org/releases/avr-libc/avr-libc-manpages-%{version}.tar.bz2
44df907
Source2:        http://download.savannah.gnu.org/releases/avr-libc/avr-libc-user-manual-%{version}.tar.bz2
44df907
Source3:        http://download.savannah.gnu.org/releases/avr-libc/avr-libc-user-manual-%{version}.pdf.bz2
4633cd0
Patch0:         avr-libc-1.6.4-documentation.patch
422547b
Source4:        http://distribute.atmel.no/tools/opensource/Atmel-AVR-Toolchain-3.4.2/avr/avr-patches.tar.gz
422547b
Source5:        http://distribute.atmel.no/tools/opensource/Atmel-AVR-Toolchain-3.4.2/avr/avr-headers-6.1.3.1475.zip
e6ab9c7
7c0f01e
BuildRequires:  avr-gcc, autoconf, automake, libtool
2e52358
BuildArch:      noarch
2e52358
2e52358
%description
2e52358
AVR Libc is a Free Software project whose goal is to provide a high quality C
2e52358
library for use with GCC on Atmel AVR microcontrollers.
2e52358
2e52358
AVR Libc is licensed under a single unified license. This so-called modified
2e52358
Berkeley license is intented to be compatible with most Free Software licenses
2e52358
like the GPL, yet impose as little restrictions for the use of the library in
2e52358
closed-source commercial applications as possible.
2e52358
2e52358
9b95e9f
%package doc
2e52358
Summary:        AVR C library docs in html and pdf format
2e52358
Group:          Development/Tools
2e52358
Requires:       %{name} = %{version}-%{release}
1fee519
Obsoletes:      %{name}-docs < %{version}-%{release}
2e52358
9b95e9f
%description doc
2e52358
This package contains the AVR C library docs in html and pdf format, the main
2e52358
package already contains the docs in man-page format (use "avr-man xxxx" to
2e52358
access these).
2e52358
2e52358
2e52358
%prep
422547b
%setup -q -a 1 -a 4 -a 5
4633cd0
%patch0 -p0
422547b
I=0
422547b
for f in avr-patches/avr-libc/*.patch
422547b
do
422547b
  echo $f
422547b
  patch -p0 <$f
422547b
done
422547b
for i in ./avr-headers//io[0-9a-zA-Z]*.h
422547b
do
422547b
  cp $i include/avr/ -v
422547b
done
422547b
44df907
# Add html docs
44df907
mkdir html
44df907
cd html/
44df907
tar -jxvf %SOURCE2
44df907
cd -
44df907
# Add pdf manual
44df907
mkdir pdf
44df907
cd pdf/
44df907
bzip2 -dc %SOURCE3 > avr-libc-user-manual-%{version}.pdf
44df907
cd -
44df907
44df907
2e52358
for i in doc/api/faq.dox doc/api/overview.dox include/stdio.h include/stdlib.h;
2e52358
  do
2e52358
    iconv -f CP1252 -t UTF8 $i > tmp
2e52358
    mv tmp $i
2e52358
done
9b95e9f
sed -i 's|@DOC_INST_DIR@/man|%{_prefix}/avr/share/man|' scripts/avr-man.in
2e52358
2e52358
2e52358
%build
422547b
./bootstrap
422547b
#autoreconf -fiv # required for aarch64 support, not needed since autotools 2.69+
2e52358
# The ps doc ways in at 7Mb versus 2.5 for the pdf and has little added value
44df907
./configure --prefix=%{_prefix} --host=avr --build=`./config.guess` #--enable-doc
2e52358
# don't use %{?_smp_mflags}, it breaks the build
2e52358
make
2e52358
2e52358
2e52358
%install
2e52358
rm -rf $RPM_BUILD_ROOT
2e52358
make install DESTDIR=$RPM_BUILD_ROOT
2e52358
2e52358
# put the man-pages in the FHS mandir and gzip them
9b95e9f
mkdir -p $RPM_BUILD_ROOT%{_prefix}/avr/share
44df907
find man/ -type f -exec gzip {} \;
44df907
mv man  $RPM_BUILD_ROOT%{_prefix}/avr/share
2e52358
2e52358
# we only want to use %doc with an absolute path to avoid rpmbuild from erasing
19b1811
# %{_docdir}/%{name}
19b1811
mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} $RPM_BUILD_ROOT%{_docdir}/%{name}
2e52358
install -p -m 644 doc/TODO doc/CHANGES.old AUTHORS ChangeLog* LICENSE NEWS \
19b1811
  pdf/* README $RPM_BUILD_ROOT%{_docdir}/%{name}
19b1811
mkdir $RPM_BUILD_ROOT%{_docdir}/%{name}/html
19b1811
install -p -m 644 html/%{name}-user-manual*/* $RPM_BUILD_ROOT%{_docdir}/%{name}/html
2e52358
2e52358
# despite us being noarch redhat-rpm-config insists on stripping our files
6812adc
%if %{fedora}0 > 200
6812adc
%global __os_install_post /usr/lib/rpm/brp-compress
6812adc
%else
6812adc
%global __os_install_post /usr/lib/rpm/redhat/brp-compress
6812adc
%endif
2e52358
2e52358
%clean
2e52358
rm -rf $RPM_BUILD_ROOT
2e52358
2e52358
2e52358
%files
2e52358
%defattr(-,root,root,-)
2e52358
%dir %{_prefix}/avr
9b95e9f
%dir %{_prefix}/avr/share
9b95e9f
%doc %{_prefix}/avr/share/man
19b1811
%dir %{_docdir}/%{name}
19b1811
%doc %{_docdir}/%{name}/AUTHORS
19b1811
%doc %{_docdir}/%{name}/C*
19b1811
%doc %{_docdir}/%{name}/LICENSE
19b1811
%doc %{_docdir}/%{name}/NEWS
19b1811
%doc %{_docdir}/%{name}/README
19b1811
%doc %{_docdir}/%{name}/TODO
19b1811
%doc %{_docdir}/%{name}/examples
2e52358
%{_prefix}/avr/include
2e52358
%{_prefix}/avr/lib
2e52358
%{_bindir}/avr-man
2e52358
9b95e9f
%files doc
2e52358
%defattr(-,root,root,-)
19b1811
%doc %{_docdir}/%{name}/html
19b1811
%doc %{_docdir}/%{name}/%{name}*.pdf
2e52358
2e52358
%changelog
fa9e29f
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-10
fa9e29f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
fa9e29f
6812adc
* Mon Jun 09 2014 Michal Hlavinka <mhlavink@redhat.com> - 1.8.0-9
6812adc
- fix FTBFS (#1105987)
6812adc
5ecec75
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-8
5ecec75
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
5ecec75
19b1811
* Thu Aug 08 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.8.0-7
19b1811
- use unversioned docdir (#993677)
19b1811
54c1142
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-6
54c1142
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
54c1142
422547b
* Tue Jun 25 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.8.0-5
422547b
- use more atmel's patches to support more MCUs (#972384)
422547b
ce2b51b
* Wed Mar 27 2013 Michal Hlavinka <mhlavink@redhat.com> - 1.8.0-4
ce2b51b
- fix aarch64 support (#925065)
ce2b51b
a2f04ea
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-3
a2f04ea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a2f04ea
1fee519
* Tue Dec 04 2012 Michal Hlavinka <mhlavink@redhat.com> - 1.8.0-2
1fee519
- fix avr-libc-docs -> avr-libc-doc transition (#883339)
1fee519
9a10aba
* Thu Nov 15 2012 Michal Hlavinka <mhlavink@redhat.com> - 1.8.0-1
9a10aba
- updated to 1.8.0
9a10aba
87d7ef4
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.1-4
87d7ef4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
87d7ef4
9b95e9f
* Tue Jan 3 2012 Thibault North <tnorth@fedoraproject.org> 1.7.1-3
9b95e9f
- Build docs with doxygen
9b95e9f
c9dd2b1
* Wed Dec 7 2011 Thibault North <tnorth@fedoraproject.org> 1.7.1-2
c9dd2b1
- Add html and pdf docs
c9dd2b1
e6ab9c7
* Sat Oct 15 2011 Thibault North <tnorth@fedoraproject.org> 1.7.1-1
e6ab9c7
- New upstream release
e6ab9c7
- Fix PSTR definition BZ#737449
e6ab9c7
- Remove docs for now as they don't compile properly (sorry)
e6ab9c7
4ca8811
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.0-2
4ca8811
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
4ca8811
65988d3
* Sun Jul 11 2010 Thibault North <tnorth@fedoraproject DOT org> 1.7.0-1
65988d3
- Version 1.7.0
65988d3
ea15ae0
* Fri Mar 12 2010 Thibault North <tnorth AT fedoraproject DOT org> 1.6.8-1
ea15ae0
- New upstream release. Fixes in power.h for 8-bits AVR
ea15ae0
ceb9a01
* Mon Nov 30 2009 Thibault North <tnorth AT fedoraproject DOT org> 1.6.5-2
ceb9a01
- Rebuild with new avr-gcc
ceb9a01
38e467a
* Wed Nov 25 2009 Thibault North <tnorth AT fedoraproject DOT org> 1.6.5-1
38e467a
- Updated to 1.6.7 
38e467a
3247fa3
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.4-5
3247fa3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
3247fa3
5abef88
* Tue May 26 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 1.6.4-4
5abef88
- Fix unowned versioned documentation directory (#473625).
5abef88
d6e6772
* Sat Apr 18 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 1.6.4-3
d6e6772
- Fix FTBFS: force noarch (see comment in the top of the spec file).
d6e6772
9326d5b
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.4-2
9326d5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
9326d5b
4633cd0
* Thu Feb 19 2009 Thibault North <tnorth AT fedoraproject DOT org> 1.6.4-1
4633cd0
- New upstream release
4633cd0
- Patches update
4633cd0
2e52358
* Tue Jul 17 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.4.6-4
2e52358
- Gzip manpages
2e52358
- Make manpages %%doc
2e52358
- Install -docs documentation in same dir as the main package docs
2e52358
- Change License field from GPL to BSD (oops)
2e52358
2e52358
* Sun Jun  8 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.4.6-3
2e52358
- Move man pages to /usr/avr/share/man
2e52358
2e52358
* Fri May 25 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.4.6-2
2e52358
- Add patch from Trond Danielsen (trond.danielsen@gmail.com) to fix pdf doc
2e52358
  generation
2e52358
- Put html and pdf docs in a seperate -docs subpackage
2e52358
2e52358
* Thu May 24 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.4.6-1
2e52358
- Initial Fedora package