File: qwtspec.html

package info (click to toggle)
libqwt 4.2.0-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 9,856 kB
  • ctags: 5,512
  • sloc: cpp: 22,973; ansic: 244; makefile: 59
file content (279 lines) | stat: -rw-r--r-- 19,735 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Qwt User&apos;s Guide: qwt.spec</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.8 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1><a class="anchor" name="qwtspec">qwt.spec</a></h1><div class="fragment"><pre><span class="preprocessor">#-*- rpm-spec -*- ###############################################</span>
<span class="preprocessor"></span><span class="preprocessor"># Qwt Widget Library</span>
<span class="preprocessor"></span><span class="preprocessor"># Copyright (C) 1997   Josef Wilgen</span>
<span class="preprocessor"></span><span class="preprocessor"># Copyright (C) 2002   Uwe Rathmann</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor"># This library is free software; you can redistribute it and/or</span>
<span class="preprocessor"></span><span class="preprocessor"># modify it under the terms of the Qwt License, Version 1.0</span>
<span class="preprocessor"></span><span class="preprocessor">#################################################################</span>
<span class="preprocessor"></span>
<span class="preprocessor"># rpm spec file template for Qwt.  </span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor"># Qwt doesn't distribute binary packages as there are too many </span>
<span class="preprocessor"></span><span class="preprocessor"># distributions and Qt options. If you would like to have Qwt rpm</span>
<span class="preprocessor"></span><span class="preprocessor"># packages, this spec file template will help you to build them.</span>
<span class="preprocessor"></span><span class="preprocessor"># It was tested on:</span>
<span class="preprocessor"></span><span class="preprocessor">#    Mandrake- 8.2/9.1/10.0</span>
<span class="preprocessor"></span><span class="preprocessor">#    Red Hat- 8.0</span>
<span class="preprocessor"></span><span class="preprocessor">#    SuSE- 9.0</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor"># 1) Set QTDIR to point to the Qt release you want to build Qwt for.</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor"># 2) If qmake is not installed, the spec file will fallback on tmake.</span>
<span class="preprocessor"></span><span class="preprocessor">#    In this case you have to set TMAKEPATH.</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor"># 3) If qmake is installed, the spec file assumes Qt &gt; 3.X and tries to build</span>
<span class="preprocessor"></span><span class="preprocessor">#    and install the qwtplugin for the designer.</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor"># 4) The spec file tries to autodetect if a threaded Qt-library is installed.</span>
<span class="preprocessor"></span><span class="preprocessor">#    If a threaded version is not available, it tries to build against the</span>
<span class="preprocessor"></span><span class="preprocessor">#    non-threaded Qt-library.</span>
<span class="preprocessor"></span><span class="preprocessor">#    If you need C++-exceptions, %define use_exceptions 1</span>
<span class="preprocessor"></span><span class="preprocessor">#    If you need the man pages, %define use_man 1</span>
<span class="preprocessor"></span><span class="preprocessor">#    If you need to change any other option in the pro-files un-tar the Qwt</span>
<span class="preprocessor"></span><span class="preprocessor">#    package, edit the pro files and tar it again.</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor"># 5) The spec file builds a qwt and a qwt-devel package. The qwt-devel</span>
<span class="preprocessor"></span><span class="preprocessor">#    package includes qwt-examples. If you don't like to install the</span>
<span class="preprocessor"></span><span class="preprocessor">#    examples remove the line '%doc examples' in the %files section. </span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor"># 6) Each distribution has a default RPM-BUILD-TREE. </span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#       - On Mandrake, it is /usr/src/RPM</span>
<span class="preprocessor"></span><span class="preprocessor">#       - On SuSE, it is /usr/src/packages</span>
<span class="preprocessor"></span><span class="preprocessor">#       - On Red Hat, it is /usr/src/redhat</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#    You need write access to the RPM-BUILD-TREE. However, a regular user</span>
<span class="preprocessor"></span><span class="preprocessor">#    can specify their own build area with the topdir variable in</span>
<span class="preprocessor"></span><span class="preprocessor">#    ~/.rpmmacros. Please see:</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#        http://www-106.ibm.com/developerworks/library/l-rpm2/</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#    At this point, you have two choices:</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#    a) Make sure the correct version of the spec file is in the</span>
<span class="preprocessor"></span><span class="preprocessor">#       tar file, then run:</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#               rpm -ta qwt-4.2.0.tar.bz2</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#       or:</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#               rpmbuild -ta qwt-4.2.0.tar.bz2</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#       Note: You may just want to try this option to see if it works</span>
<span class="preprocessor"></span><span class="preprocessor">#       "out of the box." If it doesn't, you may need to change the spec</span>
<span class="preprocessor"></span><span class="preprocessor">#       file and/or try the next option.</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#    b) Copy the spec file to RPM-BUILD-TREE/SPECS and the source file</span>
<span class="preprocessor"></span><span class="preprocessor">#       qwt-4.2.0.tar.bz2 to RPM-BUILD-TREE/SOURCES, then run:</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#              rpm -ba --clean RPM-BUILD-TREE/SPECS/qwt.spec</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#       or:</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#              rpmbuild -ba --clean RPM-BUILD-TREE/SPECS/qwt.spec</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor">#</span>
<span class="preprocessor"></span><span class="preprocessor"># 7) You find the following packages:</span>
<span class="preprocessor"></span><span class="preprocessor"># RPM-BUILD-TREE/RPMS</span><span class="comment">/*/qwt-4.2.0-1.*.rpm</span>
<span class="comment">#       RPM-BUILD-TREE/RPMS/*/qwt-devel-4.2.0-1.*.rpm</span>
<span class="comment">#       RPM-BUILD-TREE/SRPMS/qwt-4.2.0-1.src.rpm</span>
<span class="comment">#    where * depends on your processor and distribution.</span>
<span class="comment"></span>
<span class="comment"></span>
<span class="comment">#define use_exceptions  1, if you want to enable exceptions</span>
<span class="comment">%define use_exceptions  0</span>
<span class="comment">#define use_man   1, if want to install the man pages</span>
<span class="comment">%define use_man   0</span>
<span class="comment"></span>
<span class="comment">%define name    qwt</span>
<span class="comment">%define version 4.2.0</span>
<span class="comment">%define release 1</span>
<span class="comment">%define qtdir   %(echo $QTDIR)</span>
<span class="comment"></span>
<span class="comment">%{expand:%define buildForSuSE %(if [ -e /etc/SuSE-release ]; then echo 1; else echo 0; fi)}</span>
<span class="comment"></span>
<span class="comment">Summary:  Qt Widgets for Technical applications (Qwt)</span>
<span class="comment">Name:   %{name}</span>
<span class="comment">Version:  %{version}</span>
<span class="comment">Release:  %{release}</span>
<span class="comment">License:  Qwt (LGPL, but allowing static linking to proprietary programs)</span>
<span class="comment">URL:    http://sourceforge.net/projects/qwt</span>
<span class="comment">Group:    System/Libraries</span>
<span class="comment">Source:   %{name}-%{version}.tar.bz2</span>
<span class="comment">BuildRoot:  %{_tmppath}/%{name}-buildroot</span>
<span class="comment"></span>
<span class="comment">%description</span>
<span class="comment">Qwt is an extension to the Qt GUI library from Troll Tech AS.  The Qwt library</span>
<span class="comment">contains widgets and components which are primarily useful for technical and</span>
<span class="comment">scientifical purposes.  It includes a 2-D plotting widget, different kinds of</span>
<span class="comment">sliders, and much more.</span>
<span class="comment"></span>
<span class="comment">%package devel</span>
<span class="comment">Summary:  Qt Widgets for Technical applications (Qwt)</span>
<span class="comment">Group:    Development/C++</span>
<span class="comment"></span>
<span class="comment">%description devel</span>
<span class="comment">Qwt is an extension to the Qt GUI library from Troll Tech AS.  The Qwt library</span>
<span class="comment">contains widgets and components which are primarily useful for technical and</span>
<span class="comment">scientifical purposes.  It includes a 2-D plotting widget, different kinds of</span>
<span class="comment">sliders, and much more.  This package contains the header files, HTML and MAN</span>
<span class="comment">documentation and all examples.</span>
<span class="comment"></span>
<span class="comment">The Qwt license is based on the LGPL, with exceptions to allow static linking</span>
<span class="comment">to closed source programs. Modifications of the Qwt library fall under the</span>
<span class="comment">LGPL and use of the Qwt library has to be acknowledged.</span>
<span class="comment"></span>
<span class="comment">%prep</span>
<span class="comment">%setup -n %{name}-%{version}</span>
<span class="comment"># zap CVS stuff, in case of a snapshot</span>
<span class="comment">find . -name CVS -o -name .cvsignore | xargs rm -Rf</span>
<span class="comment"></span>
<span class="comment"># check for a threaded qt library and if not found,</span>
<span class="comment"># modify the *.pro files to fall back on a non-threaded </span>
<span class="comment"># Qt library, if found.</span>
<span class="comment">if [ ! -e $QTDIR/lib/libqt-mt.so -a -e $QTDIR/lib/libqt.so ]; then</span>
<span class="comment">    perl -e "s|thread||g" -pi  `find . -name "*.pro"`</span>
<span class="comment">fi</span>
<span class="comment"></span>
<span class="comment">%if %use_exceptions</span>
<span class="comment">find . -name "*.pro" | perl -e "s|-fno-exceptions||g" -pi</span>
<span class="comment">perl -e "s|-fno-exceptions||g" -pi `find . -name "*.pro"`</span>
<span class="comment">%endif</span>
<span class="comment"></span>
<span class="comment"># try to run qmake, or fall back on tmake </span>
<span class="comment">if [ -e $QTDIR/bin/qmake ]; then</span>
<span class="comment">    $QTDIR/bin/qmake qwt.pro -o Makefile</span>
<span class="comment">    (cd examples; $QTDIR/bin/qmake examples.pro -o Makefile)</span>
<span class="comment">    (cd designer; $QTDIR/bin/qmake qwtplugin.pro -o Makefile)</span>
<span class="comment">else</span>
<span class="comment">    tmake qwt.pro -o Makefile</span>
<span class="comment">    (cd examples; tmake examples.pro -o Makefile)</span>
<span class="comment">fi</span>
<span class="comment"></span>
<span class="comment">%build</span>
<span class="comment"></span>
<span class="comment"># build the library</span>
<span class="comment">make "CXX=`which ccache` g++"</span>
<span class="comment"></span>
<span class="comment"># build the designer plugin</span>
<span class="comment">if [ -e $QTDIR/bin/qmake ]; then</span>
<span class="comment">    (cd designer; make "CXX=`which ccache` g++")</span>
<span class="comment">fi</span>
<span class="comment"></span>
<span class="comment"># building the examples is a useful check </span>
<span class="comment">(cd examples; make"CXX=`which ccache` g++")</span>
<span class="comment"> </span>
<span class="comment">%install</span>
<span class="comment"></span>
<span class="comment">rm -rf %{buildroot}</span>
<span class="comment">mkdir -p %{buildroot}%{qtdir}/include/qwt</span>
<span class="comment">mkdir -p %{buildroot}%{qtdir}/lib</span>
<span class="comment">%if %use_man</span>
<span class="comment">mkdir -p %{buildroot}/%{_mandir}/man3</span>
<span class="comment">%endif</span>
<span class="comment"></span>
<span class="comment">for n in include/*.h ; do</span>
<span class="comment">    install -m 644 $n %{buildroot}%{qtdir}/include/qwt</span>
<span class="comment">done</span>
<span class="comment"></span>
<span class="comment"># install, preserving links</span>
<span class="comment">chmod 644 lib/libqwt.so*</span>
<span class="comment">for n in lib/libqwt.so* ; do</span>
<span class="comment">    cp -d $n %{buildroot}%{qtdir}/lib</span>
<span class="comment">done</span>
<span class="comment"></span>
<span class="comment"># SuSE-9.0 has the policy of linking from /usr/lib to $(QTDIR)/lib</span>
<span class="comment">%if %buildForSuSE</span>
<span class="comment">mkdir -p %{buildroot}%{_libdir}</span>
<span class="comment">(cd %{buildroot}%{_libdir}; ln -sf $(basename %{qtdir})/lib/libqwt.so.4)</span>
<span class="comment">%endif</span>
<span class="comment"></span>
<span class="comment"># build the designer plugin</span>
<span class="comment">if [ -e $QTDIR/bin/qmake ]; then</span>
<span class="comment">    (cd designer; make install INSTALL_ROOT=%{buildroot})</span>
<span class="comment">    echo "%{qtdir}/plugins/designer/libqwtplugin.so" &gt; plugin.list</span>
<span class="comment">else</span>
<span class="comment">    echo &gt;plugin.list</span>
<span class="comment">fi</span>
<span class="comment"></span>
<span class="comment">%if %use_man</span>
<span class="comment">for n in doc/man/man3/*.3 ; do</span>
<span class="comment">    install -m 644 $n %{buildroot}/%{_mandir}/man3</span>
<span class="comment">done</span>
<span class="comment">%endif</span>
<span class="comment"></span>
<span class="comment"># clean up the example tree</span>
<span class="comment">(cd examples; make distclean)</span>
<span class="comment">(cd examples; rm -f .*.cache */</span>.*.cache *<span class="comment">/*/.*.cache)</span>
<span class="comment">(cd examples; rm -rf Makefile */</span>moc */obj *<span class="comment">/*/moc */</span>*/obj)

<span class="preprocessor"># the %%post and %%postun directives are superfluous on SuSE, but harmless</span>
<span class="preprocessor"></span>%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root)
%doc CHANGES COPYING README
%{qtdir}/lib/libqwt.so*
%<span class="keywordflow">if</span> %buildForSuSE
%{_libdir}/libqwt.so*
%endif

%files devel -f plugin.list
%defattr(-, root, root)
%doc COPYING doc/html<span class="comment">/*.css doc/html/*.html doc/html/*.gif doc/html/*.png</span>
<span class="comment">%doc examples</span>
<span class="comment">%dir %{qtdir}/include/qwt</span>
<span class="comment">%{qtdir}/include/qwt/*</span>
<span class="comment">%if %use_man</span>
<span class="comment">%{_mandir}/man3/*</span>
<span class="comment">%endif</span>
<span class="comment"></span>
<span class="comment"></span>
<span class="comment">%changelog</span>
<span class="comment">* Mon Jun 13 2004 Gerard Vermeulen &lt;gerard.vermeul@grenoble.cnrs.fr&gt; 4.2.0-1</span>
<span class="comment">- make qwt.spec from qwt.spec.in</span>
<span class="comment">- replaced %{version} by * in libqwt.so.%{version}</span>
<span class="comment">- added ccache</span>
<span class="comment">- install Qwt in %qtdir and adapt to the SuSE /etc/ld.so.conf policy</span>
<span class="comment"></span>
<span class="comment">* Mon Oct 13 2003 Uwe Rathmann &lt;uwe.rathmann@epost.de&gt; 4.2.0-1</span>
<span class="comment">- rename 0.4.2 to 4.2.0</span>
<span class="comment"></span>
<span class="comment">* Wed Apr 09 2003 Gerard Vermeulen &lt;gvermeul@grenoble.cnrs.fr&gt; 0.4.2-1</span>
<span class="comment">- changed license from LGPL to Qwt</span>
<span class="comment">- add designer plugin to qwt-devel</span>
<span class="comment">- remove example binaries &amp; other files made when building the examples</span>
<span class="comment"></span>
<span class="comment">* Tue Apr 08 2003 John Cummings &lt;jcummings2@users.sourceforge.net&gt;</span>
<span class="comment">- properly ordered changelog</span>
<span class="comment">- changed copyright tag to license</span>
<span class="comment">- improved instructions</span>
<span class="comment"></span>
<span class="comment">* Tue Aug 06 2002 Uwe Rathmann </span>
<span class="comment">- update for Qwt-0.4.2</span>
<span class="comment"></span>
<span class="comment">* Wed Apr 24 2002 Gerard Vermeulen &lt;gvermeul@polycnrs-gre.fr&gt; 0.4.1-1</span>
<span class="comment">- spec file for Qwt-0.4.1 with Qt-2.X, Qt-3.X on Mandrake, Suse, ...</span>
<span class="comment"></span>
<span class="comment"># EOF</span>
<span class="comment"></span>
</pre></div> <hr size="1"><address style="align: right;"><small>Generated on Tue Nov 16 21:12:43 2004 for Qwt User's Guide by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>