-
Notifications
You must be signed in to change notification settings - Fork 0
/
SFEaudacity.spec
235 lines (207 loc) · 6.62 KB
/
SFEaudacity.spec
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
#
# spec file for package SFEaudacity
#
# includes module(s): audacity
#
%include Solaris.inc
%define with_libmad %(pkginfo -q SFElibmad && echo 1 || echo 0)
%define with_libtwolame %(pkginfo -q SFElibtwolame && echo 1 || echo 0)
%define with_wxw_gcc %(pkginfo -q SFEwxwidgets-gnu && echo 1 || echo 0)
%define src_name audacity
Name: SFEaudacity
Summary: Free, Cross-Platform Sound Editor
Version: 1.3.6
Source: %{sf_download}/audacity/%{src_name}-src-%{version}.tar.bz2
# bug 1910678
Patch1: audacity-01-solaris.diff
# bug 1910685
Patch2: audacity-02-fixsed.diff
# bug 1910699
Patch3: audacity-03-addgtklibs.diff
Patch4: audacity-04-allegrord.diff
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
BuildRequires: SFElibsamplerate-devel
Requires: SFElibsamplerate
BuildRequires: SFEportaudio-devel
Requires: SFEportaudio
BuildRequires: SFEladspa-devel
Requires: SFEladspa
Requires: SFEladspa-swh-plugins
BuildRequires: SFEsoundtouch-devel
Requires: SFEsoundtouch
# Check whether the user has installed the Sun Studio or GCC
# version of wxWidgets, and build with GCC if using the GCC
# version
%if %with_wxw_gcc
BuildRequires: SFEgcc
BuildRequires: SFEwxwidgets-gnu-devel
Requires: SFEwxwidgets-gnu
%else
BuildRequires: SUNWwxwidgets-devel
Requires: SUNWwxwidgets
%endif
# If building with libmad, then also require id3tag. If
# building with the GCC wxwidgets, then also require the
# GCC version of libid3tag.
#
%if %with_libmad
BuildRequires: SFElibmad-devel
Requires: SFElibmad
%if %with_wxw_gcc
BuildRequires: SFElibid3tag-gnu-devel
Requires: SFElibid3tag-gnu
%else
BuildRequires: SFElibid3tag-devel
Requires: SFElibid3tag
%endif
%endif
# If twolame is installed, build with it.
%if %with_libtwolame
BuildRequires SFEtwolame-devel
Requires SFEtwolame
%endif
%package l10n
Summary: %{summary} - l10n files
SUNW_BaseDir: %{_basedir}
%include default-depend.inc
Requires: %{name}
%prep
%setup -q -n %{src_name}-src-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
CPUS=1
fi
%if %with_wxw_gcc
%if %debug_build
export CFLAGS="-g"
AU_DEBUG_CONFIG=-enable-debug --enable-debug-output
%else
export CFLAGS="-O4"
AU_DEBUG_CONFIG=-disable-debug
%endif
%endif
export CPPFLAGS="-I/usr/gnu/include -I/usr/X11/include -I/usr/sfw/include"
export PATH=/usr/gnu/bin:$PATH
export LDFLAGS="-L/usr/gnu/lib -L/usr/X11/lib -R/usr/gnu/lib -R/usr/X11/lib -R/usr/sfw/lib"
%if %with_wxw_gcc
export CC=gcc
export CXX=g++
%endif
CFLAGS="$CFLAGS -fPIC -DPIC -fno-omit-frame-pointer"
CXXFLAGS="$CFLAGS -fPIC -DPIC -fno-omit-frame-pointer"
%if %with_libmad
AU_LIBMAD_CONFIG="--with-libmad"
%else
AU_LIBMAD_CONFIG="--without-libmad"
%endif
%if %with_libtwolame
AU_LIBTWOLAME_CONFIG="--with-libtwolame"
%else
AU_TWOLAME_CONFIG="--without-libtwolame"
%endif
# Must run autoconf in portaudio-v19 code since we patch
# configure.in.
#
cd lib-src/portaudio-v19
libtoolize -f -c
aclocal $ACLOCAL_FLAGS
autoconf -f
cd ../..
export ACLOCAL_FLAGS="-I %{_datadir}/aclocal -I ./m4"
libtoolize -f -c
aclocal $ACLOCAL_FLAGS
autoheader
autoconf -f
./configure --prefix=%{_prefix} \
--bindir=%{_bindir} \
--datadir=%{_datadir} \
--libdir=%{_libdir} \
--mandir=%{_mandir} \
--with-ladspa \
$AU_DEBUG_CONFIG \
$AU_LIBMAD_CONFIG \
$AU_LIBTWOMAD_CONFIG \
--without-quicktime
%if %with_wxw_gcc
# /usr/gnu/bin/gcc is using gnu ld....
perl -pi -e 's/-M ...wl./--version-script=/' lib-src/portaudio-v19/libtool
perl -pi -e 's/-Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect//' src/Makefile
perl -pi -e 's/-Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect//' tests/Makefile
%endif
make
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mv $RPM_BUILD_ROOT%{_datadir}/locale/zh $RPM_BUILD_ROOT%{_datadir}/locale/zh_CN
cd $RPM_BUILD_ROOT%{_datadir}/locale
ln -s zh_CN zh
%clean
rm -rf $RPM_BUILD_ROOT
%post
( echo 'test -x /usr/bin/update-desktop-database || exit 0';
echo '/usr/bin/update-desktop-database'
) | $BASEDIR/lib/postrun -b -u -c JDS_wait
( echo 'test -x %{_bindir}/update-mime-database || exit 0';
echo '%{_bindir}/update-mime-database %{_datadir}/mime'
) | $BASEDIR/lib/postrun -b -u -c JDS_wait
%postun
( echo 'test -x /usr/bin/update-desktop-database || exit 0';
echo '/usr/bin/update-desktop-database'
) | $BASEDIR/lib/postrun -b -u -c JDS_wait
( echo 'test -x %{_bindir}/update-mime-database || exit 0';
echo '%{_bindir}/update-mime-database %{_datadir}/mime'
) | $BASEDIR/lib/postrun -b -u -c JDS_wait
%files
%defattr (-, root, bin)
%{_bindir}
%dir %attr (0755, root, sys) %{_datadir}
%{_mandir}
%{_datadir}/audacity
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/*
%dir %attr (0755, root, other) %{_datadir}/doc
%{_datadir}/doc/*
%dir %attr (-, root, root) %{_datadir}/mime
%attr (-, root, root) %{_datadir}/mime/*
%attr (-, root, other) %{_datadir}/locale
%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/locale
%{_datadir}/locale
%endif
%changelog
* Wed Jan 07 2008 - brian.cameron@sun.com
- Bump to 1.3.6. Remove upstream patch audacity-06-shuttlegui.diff.
* Sat Nov 29 2008 - gilles.dauphin@enst.fr
- SUNWwxidgets is now in B101
* Wen Nov 05 2008 - gilles.dauphin@enst.fr
- link to zh_CN needed. it can't install correctly whitout that
* Mon May 12 2008 - brian.cameron@sun.com
- Bump to 1.3.5. Remove many upstream patches. Add two new patches,
one to add needed m4 files, and the other to fix a compile problem
with the ShuttleGui code.
* Mon Mar 18 2008 - brian.cameron@sun.com
- Bump to 1.3.4. Many changes to the patches to get this new version
working. SoundTouch was removed from the audacity release, so I added
a separate spec-file to build SoundTouch, and made this package depend
on it.
* Sun Mar 9 2008 - brian.cameron@sun.com
- Bump to 1.3.3. Add new patches to allow building with Sun Studio.
Fix so that libmad, libid3tag, and libtwolame support is only included if
they are already installed, so this spec doesn't build with any encumbered
dependencies unless they are already installed on the system. Also
add patch to allow building without GNU gettext if it is not already
installed on the system.
* Tue Feb 12 2008 - pradhap (at) gmail.com
- Fix links
* Sat Sep 22 2007 - dougs@truemail.co.th
- Initial spec