~ubuntu-branches/ubuntu/trusty/avr-libc/trusty

2.1.1 by Hakan Ardo
Upstream update
1
## -*- mode: rpm-spec; -*-
2
##
1.1.1 by Hakan Ardo
Import upstream version 1.2.3
3
##
4
## Copyright (c) 2004  Theodore A. Roth
5
## All rights reserved.
6
##
7
## Redistribution and use in source and binary forms, with or without
8
## modification, are permitted provided that the following conditions are met:
9
##
10
## * Redistributions of source code must retain the above copyright
11
##   notice, this list of conditions and the following disclaimer.
12
##
13
## * Redistributions in binary form must reproduce the above copyright
14
##   notice, this list of conditions and the following disclaimer in
15
##   the documentation and/or other materials provided with the
16
##   distribution.
17
##
18
## * Neither the name of the copyright holders nor the names of
19
##   contributors may be used to endorse or promote products derived
20
##   from this software without specific prior written permission.
21
##
22
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23
## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25
## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26
## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27
## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
## POSSIBILITY OF SUCH DAMAGE.
33
##
1.2.4 by Hakan Ardo
Import upstream version 1.7.1
34
## $Id: avr-libc.spec.in 1037 2006-01-06 22:31:33Z joerg_wunsch $
2.1.1 by Hakan Ardo
Upstream update
35
##
36
## @configure_input@
37
##
38
39
%define libc_version @VERSION@
40
41
# We don't want rpm stripping any files
42
%define __spec_install_post %{nil}
43
44
# Don't build the debuginfo rpm
45
%define debug_package %{nil}
46
47
%define _with_docs 1
48
%{?_without_docs: %define _with_docs 0}
49
50
Summary: AVR libc.
51
Name: avr-libc
52
Version: %{libc_version}
53
Release: 1
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
54
License: BSD
2.1.1 by Hakan Ardo
Upstream update
55
Group: Avr/Development/Tools
56
URL: http://savannah.gnu.org/projects/avr-libc
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
57
Source0: http://savannah.gnu.org/download/avr-libc/avr-libc-%{version}.tar.bz2
2.1.1 by Hakan Ardo
Upstream update
58
Buildroot: /var/tmp/avr-libc-%{version}-root
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
59
BuildRequires: gzip avr-gcc >= 3.4.3
2.1.1 by Hakan Ardo
Upstream update
60
%if %{_with_docs}
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
61
BuildRequires: doxygen >= 1.4.1 tetex transfig
2.1.1 by Hakan Ardo
Upstream update
62
%endif
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
63
Requires: avr-gcc >= 3.4.3
64
65
%define ourdocdir %{_defaultdocdir}/%{name}
2.1.1 by Hakan Ardo
Upstream update
66
67
%description
68
Avr-libc is a C library for developing applications for Atmel AVR
69
microcontrollers.
70
71
%if %{_with_docs}
72
## The avr-libc-docs subpackage
73
%package docs
74
Summary: Documentation for avr-libc.
75
Group: Avr/Documentation
76
%description docs
77
Documentation for avr-libc in html, postscript and pdf formats.
78
%endif
79
80
%prep
81
%setup -q
82
83
%build
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
84
./configure \
2.1.1 by Hakan Ardo
Upstream update
85
%if %{_with_docs}
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
86
	--enable-doc --disable-versioned-doc \
2.1.1 by Hakan Ardo
Upstream update
87
%endif
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
88
	--host=avr --build=$(./config.guess) \
2.1.1 by Hakan Ardo
Upstream update
89
	--prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir}
90
make
91
92
%install
93
rm -rf ${RPM_BUILD_ROOT}
94
mkdir -p ${RPM_BUILD_ROOT}%{_prefix}
95
make prefix=$RPM_BUILD_ROOT%{_prefix} mandir=$RPM_BUILD_ROOT%{_mandir} \
96
	infodir=$RPM_BUILD_ROOT%{_infodir} install
97
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
98
# Move/copy files to appropriate directory to workaround the fact that the doc
99
# directive will delete files that are already installed.
100
%if ! %{_with_docs}
101
mkdir -p $RPM_BUILD_ROOT%{ourdocdir}
102
%endif
103
cp AUTHORS ChangeLog* INSTALL LICENSE NEWS README $RPM_BUILD_ROOT%{ourdocdir}
104
2.1.1 by Hakan Ardo
Upstream update
105
%if %{_with_docs}
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
106
gzip -9 ${RPM_BUILD_ROOT}%{ourdocdir}/man/man3/*.3
107
%else
108
## Don't need man script if we aren't installing man pages.
109
rm ${RPM_BUILD_ROOT}%{_bindir}/avr-man
2.1.1 by Hakan Ardo
Upstream update
110
%endif
111
112
%clean
113
rm -rf ${RPM_BUILD_ROOT}
114
115
%files
116
%defattr(-,root,root)
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
117
%docdir %{ourdocdir}
118
%{ourdocdir}/AUTHORS
119
%{ourdocdir}/ChangeLog*
120
%{ourdocdir}/INSTALL
121
%{ourdocdir}/LICENSE
122
%{ourdocdir}/NEWS
123
%{ourdocdir}/README
124
%{ourdocdir}/examples
2.1.1 by Hakan Ardo
Upstream update
125
%dir %{_prefix}/avr
126
%dir %{_prefix}/avr/lib
127
%dir %{_prefix}/avr/lib/avr3
128
%dir %{_prefix}/avr/lib/avr4
129
%dir %{_prefix}/avr/lib/avr5
130
%dir %{_prefix}/avr/include
131
%dir %{_prefix}/avr/include/avr
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
132
%dir %{_prefix}/avr/include/compat
133
%dir %{_prefix}/avr/include/util
2.1.1 by Hakan Ardo
Upstream update
134
%{_prefix}/avr/lib/lib*
135
%{_prefix}/avr/lib/crt*
136
%{_prefix}/avr/lib/avr3/lib*
137
%{_prefix}/avr/lib/avr3/crt*
138
%{_prefix}/avr/lib/avr4/lib*
139
%{_prefix}/avr/lib/avr4/crt*
140
%{_prefix}/avr/lib/avr5/lib*
141
%{_prefix}/avr/lib/avr5/crt*
142
%{_prefix}/avr/include/*.h
143
%{_prefix}/avr/include/avr/*.h
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
144
%{_prefix}/avr/include/compat/*.h
145
%{_prefix}/avr/include/util/*.h
2.1.1 by Hakan Ardo
Upstream update
146
147
## TRoth/20021013: Argh! Why does the fscking %doc directive remove the doc
148
## dir? That's absolutely stupid. We install things there _assuming_ they
149
## will stay there. Rpm should _not_ removing things we've installed, but alas
150
## it does. Be sure to watch the output when you are building the packages.
151
152
%if %{_with_docs}
153
%files docs
154
%defattr(-,root,root)
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
155
%{_bindir}/avr-man
156
%doc %{ourdocdir}/avr-libc-user-manual
157
%doc %{ourdocdir}/avr-libc-user-manual.ps
158
%doc %{ourdocdir}/avr-libc-user-manual.pdf
159
%doc %{ourdocdir}/man
2.1.1 by Hakan Ardo
Upstream update
160
%endif
161
162
%changelog
1.1.2 by Hakan Ardo
Import upstream version 1.4.4
163
* Fri Jan 6 2006 Galen Seitz <galens@seitzassoc.com>
164
- Dealt with moved examples directory.
165
166
* Tue Nov 10 2005 Galen Seitz <galens@seitzassoc.com>
167
- Updated to work with latest tools and build procedure.
168
2.1.1 by Hakan Ardo
Upstream update
169
* Tue Oct 21 2003 Theodore Roth <troth@openavr.org>
170
- Allow disabling build of docs sub-package with "--without docs".
171
172
* Thu Apr 17 2003 Theodore Roth <troth@openavr.org>
173
- Don't build debuginfo package.
174
- Don't run post install since it strips binaries.
175
176
* Mon Nov 11 2002 Theodore Roth <troth@openavr.org>
177
- Add --enable-doc to configure command.
178
179
* Sun Oct 13 2002 Theodore Roth <troth@openavr.org>
180
- Drop avr-gcc requirement to >= 3.2.75 to allow building snapshot packages.
181
- Add docs sub-package for user manual.
182
183
* Mon Aug 12 2002 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
184
- Require avr-gcc >= 3.3.
185
186
* Mon Jul 08 2002 Theodore Roth <troth@verinet.com>
187
- Integrate spec file into build system.
188
189
* Fri May 03 2002 Theodore Roth <troth@verinet.com>
190
- Added patch to fix timer.h for mega128.
191
192
* Mon Apr 29 2002 Theodore Roth <troth@verinet.com>
193
- Added patch to fix headers.
194
- Fix strncasecmp_P macro in pgmspace.h.
195
196
* Wed Mar 27 2002 Theodore Roth <troth@verinet.com>
197
- Updated avr-gcc dependency to 3.0.4-2.
198
- Fixed up %files section to work with rh-7.1.
199
200
* Mon Mar 17 2002 Theodore Roth <troth@verinet.com>
201
- Initial spec file.