File xine-browser-plugin.spec of Package xine-browser-plugin

141
 
1
# Packmangroup: Multimedia
2
# Packmanpackagename: xine-browser-plugin
3
# Packman: Manfred Tremmel
4
5
# norootforbuild
6
7
%define major   2
8
%define libname libxine%{major}
9
%define libvers 1.2.0
10
11
Name:           xine-browser-plugin
12
Summary:        A Netscape/Mozilla plugin using xine engine for audio/video playback
13
Summary(de):    Ein Netscape/Mozilla Plugin welches xine zur Wiedergabe von Audio/Videos nutzt
14
Version:        1.0.2
15
Release:        3
16
Group:          Productivity/Networking/Web/Browsers
17
License: GPL-2.0
18
Url:            http://www.xine-project.org/home
19
20
Source0:        xine-plugin-1.0.2.tar.bz2
21
22
ExclusiveArch:  %ix86 x86_64
23
Vendor:         Packman
24
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
25
Requires:       %{libname} >= %{libvers}
26
BuildRequires:  %{libname} >= %{libvers}
27
BuildRequires:  %{libname}-devel >= %{libvers}
28
BuildRequires:  pkgconfig
29
BuildRequires:  pkgconfig(x11)
30
BuildRequires:  libjack0 >= 0.109
31
BuildRequires:  libjack-devel >= 0.109
32
Obsoletes:      xine-plugin, xine-mozilla-plugin
33
Provides:       xine-plugin, xine-mozilla-plugin
34
35
%description
36
xine-browser-plugin provides multimedia capabilities to Netscape/Mozilla or
37
compatible browsers using xine engine.
38
39
%description -l de
40
xine-browser-plugin stellt Netscape/Mozilla und kompatiblen Browsern Multimediafähigkeiten
41
basierend auf der xine Bibliothek zur Verfügung.
42
43
44
45
%prep
46
%setup -n xine-plugin-%{version}
47
48
%build
49
export CFLAGS="${RPM_OPT_FLAGS}"
50
51
if [ ! -f configure ]; then
52
   NO_CONFIGURE=1 ./autogen.sh
53
#   NO_CONFIGURE=1 ./cvscompile.sh
54
fi
55
56
#
57
# currently we do not use %%configure as it seems to cause trouble with
58
# certain automake produced configure scripts - depending on automake version.
59
# Use BUILD_ARGS envvar to pass extra parameters to configure (like --enable-dha-mod/etc...)
60
#
61
./configure --build=%{_target_platform} --prefix=%{_prefix} \
62
        --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} \
63
        --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
64
        --datadir=%{_datadir} --includedir=%{_includedir} \
65
        --libdir=%{_libdir} --libexecdir=%{_libexecdir} \
66
        --localstatedir=%{_localstatedir} \
67
        --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
68
        --infodir=%{_infodir} PLUGIN_DIR=%{_libdir}/browser-plugins \
69
        --enable-shared $BUILD_ARGS
70
make
71
72
%install
73
%{__mkdir_p} %{buildroot}%{_libdir}/browser-plugins/
74
%{__install} -m755 src/.libs/xineplugin.so %{buildroot}%{_libdir}/browser-plugins/
75
%{__install} -m644 misc/xine-logo.* %{buildroot}%{_libdir}/browser-plugins/
76
77
%post
78
if [ "$1" = "1" ] || [ "$1" = "2" ] ; then # install or update
79
    # plugindirs to check
80
    PLUGINDIRS='/opt/mozilla/%{_lib}/plugins /opt/MozillaFirefox/%{_lib}/plugins /opt/netscape/plugins /opt/mozilla/plugins %{_libdir}/firefox/plugins'
81
    # pluginname
82
    PLUGINNAME='xineplugin.so'
83
84
    for PLUGINDIR in ${PLUGINDIRS}; do
85
        if [ -d ${PLUGINDIR} ]; then
86
            cd ${PLUGINDIR}
87
            # check if plugin directory exists
88
            if [ ! -L ${PLUGINNAME} ]; then
89
                # add a symlink if it doesn't exists
90
                %{__ln_s} %{_libdir}/browser-plugins/${PLUGINNAME} .
91
            fi
92
            cd -
93
        fi
94
    done
95
fi
96
97
%preun
98
if [ "$1" = "0" ]; then # remove
99
    # plugindirs to check
100
    PLUGINDIRS='/opt/mozilla/%{_lib}/plugins /opt/MozillaFirefox/%{_lib}/plugins /opt/netscape/plugins /opt/mozilla/plugins %{_libdir}/firefox/plugins'
101
    # pluginname
102
    PLUGINNAME='xineplugin.so'
103
104
    for PLUGINDIR in ${PLUGINDIRS}; do
105
        if [ -d ${PLUGINDIR} ]; then
106
            cd ${PLUGINDIR}
107
            # check if plugin directory exists
108
            if [ -L ${PLUGINNAME} ]; then
109
                # add a symlink if it doesn't exists
110
                %{__rm} -f ${PLUGINNAME}
111
            fi
112
            cd -
113
        fi
114
    done
115
fi
116
117
%clean
118
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
119
120
%files
121
%defattr(-,root,root)
122
%doc AUTHORS COPYING README TODO
123
%{_libdir}/browser-plugins/xineplugin.so
124
%{_libdir}/browser-plugins/xine-logo.*
125
126
%changelog
127
* Tue May 14 2024 Manfred Hollstein <manfred.h@gmx.net>
128
- Switch to use pkgconfig(x11)
129
* Fri Jan 06 2012 Manfred Tremmel <Manfred.Tremmel@iiv.de> - 1.0.2-3
130
- compile against libxine2
131
* Sat Sep 12 2009 Manfred Tremmel <Manfred.Tremmel@iiv.de> - 1.0.2-1.pm.1
132
- cleanups where rpmlint wasn't so happy
133
* Sat Jul 26 2008 Manfred Tremmel <Manfred.Tremmel@iiv.de>
134
- Update to 1.0.2
135
* Thu Apr 03 2008 Manfred Tremmel <Manfred.Tremmel@iiv.de>
136
- Update to 1.0.1
137
* Sat Feb 10 2007 Manfred Tremmel <Manfred.Tremmel@iiv.de>
138
- Update to 1.0
139
* Mon Mar 24 2003 Manfred Tremmel <Manfred.Tremmel@iiv.de>
140
- first spec file
141