-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSFEbanshee.spec
203 lines (181 loc) · 6.43 KB
/
SFEbanshee.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
#
# spec file for package SFEbanshee
#
# includes module(s): banshee
#
%include Solaris.inc
Name: SFEbanshee
Version: 0.13.1
Summary: Banshee - music management and playback for GNOME
Source: http://banshee-project.org/files/banshee/banshee-%{version}.tar.gz
Patch1: banshee-01-sunpro.diff
Patch2: banshee-02-monodoc.diff
Patch3: banshee-03-solaris.diff
URL: http://banshee-project.org/
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Docdir: %{_defaultdocdir}/doc
Autoreqprov: on
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-libs-devel
BuildRequires: SUNWgnome-media-devel
BuildRequires: SUNWgnome-cd-burner-devel
BuildRequires: SFEmono-devel
BuildRequires: SFEgtk-sharp
BuildRequires: SUNWsqlite3
BuildRequires: SFElibmusicbrainz3-devel
BuildRequires: SFEmonodoc
BuildRequires: SFEavahi-sharp
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-libs
Requires: SUNWgnome-media
Requires: SUNWgnome-cd-burner
Requires: SUNWhal
Requires: SFEmono
Requires: SFEgtk-sharp
Requires: SUNWsqlite3
Requires: SFElibmusicbrainz3
Requires: SFEdbus-sharp
Requires: SFEavahi-sharp
%package root
Summary: %{summary} - / filesystem
SUNW_BaseDir: /
%include default-depend.inc
Requires: SUNWpostrun
Requires: SUNWgnome-config
%if %build_l10n
%package l10n
Summary: %{summary} - l10n files
SUNW_BaseDir: %{_basedir}
%include default-depend.inc
Requires: %{name}
%endif
%prep
%setup -q -n banshee-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -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
export PATH=/usr/mono/bin:$PATH
export CC=gcc
export CFLAGS="%optflags -mt `pkg-config --cflags gtk+-2.0` `pkg-config --cflags dbus-1` `pkg-config --cflags gnome-vfs-2.0` `pkg-config --cflags libmusicbrainz3` `pkg-config --cflags libnautilus-burn` `pkg-config --cflags gstreamer-0.10` `pkg-config --cflags mono` `pkg-config --cflags sqlite3`"
export LDFLAGS="%arch_ldadd %ldadd ${EXTRA_LDFLAGS} -mt -lpthread"
./configure --prefix=%{_prefix} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--disable-scrollkeeper \
--sysconfdir=%{_sysconfdir}
make -j $CPUS
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
rm -f $RPM_BUILD_ROOT%{_libdir}/banshee/lib*a
perl -pi -e 's/^exec (.*) mono /exec $1 \/usr\/mono\/bin\/mono /' \
$RPM_BUILD_ROOT%{_bindir}/banshee
perl -pi -e 's/^#!\/bin\/sh/#!\/bin\/bash/' $RPM_BUILD_ROOT%{_bindir}/banshee
rm -rf $RPM_BUILD_ROOT%{_localstatedir}
%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post
( echo 'test -x /usr/bin/gtk-update-icon-cache || exit 0';
echo '/usr/bin/gtk-update-icon-cache --force %{_datadir}/icons/hicolor'
) | $PKG_INSTALL_ROOT/usr/lib/postrun -b -u -t 5
( 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 /usr/bin/scrollkeeper-update || exit 0';
echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS
%postun
test -x $BASEDIR/lib/postrun || exit 0
( echo 'test -x /usr/bin/update-desktop-database || exit 0';
echo '/usr/bin/update-desktop-database'
) | $BASEDIR/lib/postrun -b -u -c JDS
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS
%post root
( echo 'test -x /usr/bin/gconftool-2 || {';
echo ' echo "ERROR: gconftool-2 not found"';
echo ' echo "ERROR: gconftool-2 not found"';
echo ' exit 0';
echo '}';
echo 'umask 0022';
echo "GCONF_CONFIG_SOURCE=xml:merged:%{_sysconfdir}/gconf/gconf.xml.defaults";
echo 'export GCONF_CONFIG_SOURCE';
echo "SDIR=%{_sysconfdir}/gconf/schemas";
echo 'for schema in $SDIR/banshee-*.schemas; do';
echo ' _usr/bin/gconftool-2 --makefile-install-rule $schema';
echo 'done'
) | $PKG_INSTALL_ROOT/usr/lib/postrun
%preun root
( echo 'test -x /usr/bin/gconftool-2 || {';
echo ' echo "ERROR: gconftool-2 not found"';
echo ' exit 0';
echo '}';
echo 'umask 0022';
echo "GCONF_CONFIG_SOURCE=xml:merged:%{_sysconfdir}/gconf/gconf.xml.defaults";
echo 'export GCONF_CONFIG_SOURCE';
echo "SDIR=%{_sysconfdir}/gconf/schemas";
echo 'for schema in $SDIR/banshee-*.schemas; do';
echo ' _usr/bin/gconftool-2 --makefile-uninstall-rule $schema';
echo 'done'
) | $PKG_INSTALL_ROOT/usr/lib/postrun
%files
%defattr(-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/banshee
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, bin) %{_datadir}/banshee
%{_datadir}/banshee/*
%dir %attr (0755, root, bin) %{_datadir}/dbus-1
%dir %attr (0755, root, bin) %{_datadir}/dbus-1/services
%{_datadir}/dbus-1/services/*
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/*
%dir %attr (0755, root, other) %{_datadir}/icons
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/scalable/
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/scalable/apps/
%{_datadir}/icons/hicolor/scalable/apps/*
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/16x16
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/16x16/apps/
%{_datadir}/icons/hicolor/16x16/apps/*
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/22x22/
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/22x22/apps/
%{_datadir}/icons/hicolor/22x22/apps/*
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/24x24/
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/24x24/apps/
%{_datadir}/icons/hicolor/24x24/apps/*
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/32x32/
%dir %attr (0755, root, other) %{_datadir}/icons/hicolor/32x32/apps/
%{_datadir}/icons/hicolor/32x32/apps/*
%files root
%defattr (0755, root, sys)
%dir %attr (0755, root, sys) %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/*
%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/locale
%endif
%changelog
* Sun Nov 18 2007 - [email protected]
- Change LDFLAGS to work for gcc.
* Sat Oct 01 2007 - [email protected]
- Initial spec