Home | History | Annotate | Download | only in core
      1 #
      2 # spec file for package SUNWcodeina
      3 #
      4 # includes module(s): codeina
      5 #
      6 # Copyright 2009 Sun Microsystems, Inc.
      7 # This file and all modifications and additions to the pristine
      8 # package are under the same license as the package itself.
      9 #
     10 %define owner yippi
     11 # bugdb: https://core.fluendo.com/gstreamer/trac/
     12 #
     13 
     14 %define OSR 10184:0.10.3.1
     15 
     16 %include Solaris.inc
     17 
     18 Name:           SUNWcodeina
     19 Summary:        Codec Installer
     20 URL:            https://core.fluendo.com/gstreamer/trac/wiki/codeina
     21 Version:        0.10.6
     22 #FIXME: We should use the community official released source tarball
     23 Source:         http://core.fluendo.com/gstreamer/src/codeina/codeina-%{version}.tar.bz2
     24 Source1:        %{name}-manpages-0.1.tar.gz
     25 #owner:yippi date:2008-11-06 type:branding
     26 Patch1:         codeina-01-fixpython.diff
     27 SUNW_BaseDir:   %{_basedir}
     28 SUNW_Copyright: SUNWcodeina.copyright
     29 BuildRoot:      %{_tmppath}/codeina-%{version}-build
     30 Requires:       SUNWPython26
     31 Requires:       SUNWgnome-python26-libs
     32 # SUNWgnome-python-extras contains gtkmozembed.
     33 Requires:       SUNWgnome-python26-extras
     34 Requires:       SUNWgnome-media
     35 Requires:       SUNWgst-python26
     36 Requires:       SUNWpyyaml26
     37 Requires:       SUNWpython26-notify
     38 Requires:       SUNWpython26-twisted
     39 Requires:       SUNWpython26-pyopenssl
     40 Requires:       SUNWpython26-xdg
     41 BuildRequires:  SUNWPython26-devel >= %{default_python_version}
     42 BuildRequires:  SUNWgst-python26
     43 BuildRequires:  SUNWpyyaml26
     44 BuildRequires:  SUNWpython26-notify-devel
     45 BuildRequires:  SUNWpython26-twisted
     46 BuildRequires:  SUNWpython26-pyopenssl
     47 BuildRequires:  SUNWpython26-xdg
     48 BuildRequires:  SUNWpython26-setuptools
     49 
     50 %include default-depend.inc
     51 
     52 %description
     53 Codeina functions as a codec installer for GStreamer applications.
     54 
     55 %package root
     56 Summary:                 %{summary} - / filesystem
     57 SUNW_BaseDir:            /
     58 %include default-depend.inc
     59 
     60 %if %build_l10n
     61 %package l10n
     62 Summary:                 %{summary} - l10n files
     63 SUNW_BaseDir:            %{_basedir}
     64 %include default-depend.inc
     65 Requires:                %{name}
     66 %endif
     67 
     68 %prep
     69 %setup -q -n codeina-%{version}
     70 %patch1 -p1
     71 
     72 gzcat %SOURCE1 | tar xf -
     73 
     74 %build
     75 export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
     76 export PKG_CONFIG_PATH="%{_pkg_config_path}:/usr/lib/python2.4/pkgconfig"
     77 export PYTHON="/usr/bin/python%{default_python_version}"
     78 intltoolize --copy --force --automake
     79 aclocal $ACLOCAL_FLAGS -I common/m4
     80 autoconf
     81 automake -a -c -f
     82 ./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir}
     83 make
     84 
     85 %install
     86 rm -rf $RPM_BUILD_ROOT
     87 make install DESTDIR=$RPM_BUILD_ROOT
     88 
     89 rm -rf $RPM_BUILD_ROOT%{_mandir}
     90 cd %{_builddir}/codeina-%version/sun-manpages
     91 make install DESTDIR=$RPM_BUILD_ROOT
     92 
     93 # Remove distro-specific files that do not apply to Solaris.
     94 rm $RPM_BUILD_ROOT%{_datadir}/codeina/logo/mandrivalinux.png
     95 rm $RPM_BUILD_ROOT%{_datadir}/codeina/logo/ubuntu.png
     96 rm $RPM_BUILD_ROOT%{_sysconfdir}/codeina/providers/fedora*xml
     97 rm $RPM_BUILD_ROOT%{_sysconfdir}/codeina/providers/mandrivalinux*xml
     98 rm $RPM_BUILD_ROOT%{_sysconfdir}/codeina/providers/plf*xml
     99 rm $RPM_BUILD_ROOT%{_sysconfdir}/codeina/providers/ubuntu*xml
    100 
    101 find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.pyo" -exec rm -f {} ';'
    102 
    103 # move to vendor-packages
    104 mkdir -p $RPM_BUILD_ROOT%{_libdir}/python%{default_python_version}/vendor-packages
    105 mv $RPM_BUILD_ROOT%{_libdir}/python%{default_python_version}/site-packages/* \
    106    $RPM_BUILD_ROOT%{_libdir}/python%{default_python_version}/vendor-packages/
    107 rmdir $RPM_BUILD_ROOT%{_libdir}/python%{default_python_version}/site-packages
    108 
    109 %if %build_l10n
    110 %else
    111 # REMOVE l10n FILES
    112 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
    113 rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/*/[a-z]*
    114 rm -f $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z].omf
    115 rm -f $RPM_BUILD_ROOT%{_datadir}/omf/*/*-??_??.omf
    116 %endif
    117 
    118 %clean
    119 rm -rf $RPM_BUILD_ROOT
    120 
    121 %files
    122 %defattr(-,root,bin)
    123 %dir %attr (0755, root, bin) %{_bindir}
    124 %{_bindir}/codeina
    125 %{_bindir}/codeina.bin
    126 %dir %attr (0755, root, bin) %{_libdir}
    127 %{_libdir}/python%{default_python_version}/vendor-packages/*
    128 %dir %attr (0755, root, sys) %{_datadir}
    129 %dir %attr (0755, root, other) %{_datadir}/applications
    130 %{_datadir}/applications/codeina.desktop
    131 %dir %attr (0755, root, sys) %{_datadir}/autostart
    132 %{_datadir}/autostart/*
    133 %{_datadir}/codeina/*
    134 %doc AUTHORS README common/m4/README
    135 %doc(bzip2) COPYING NEWS
    136 %doc(bzip2) ChangeLog common/ChangeLog
    137 %doc(bzip2) po/ChangeLog
    138 %dir %attr (0755, root, other) %{_datadir}/doc
    139 %dir %attr(0755, root, bin) %{_mandir}
    140 %dir %attr(0755, root, bin) %{_mandir}/man1
    141 %{_mandir}/man1/*
    142 
    143 %files root
    144 %defattr(-, root, sys)
    145 %attr(0755, root, sys) %dir %{_sysconfdir}
    146 %{_sysconfdir}/codeina/*
    147 %{_sysconfdir}/xdg/*
    148 
    149 %if %build_l10n
    150 %files l10n
    151 %defattr (-, root, bin)
    152 %dir %attr (0755, root, sys) %{_datadir}
    153 %attr (-, root, other) %{_datadir}/locale
    154 #FIXME: %dir %attr (0755, root, other) %{_datadir}/gnome
    155 #FIXME: %{_datadir}/gnome/help/*/[a-z]*
    156 #FIXME: %{_datadir}/omf/*/*-[a-z][a-z].omf
    157 #FIXME: Not in 2.22.0:%{_datadir}/omf/*/*-[a-z][a-z]_[A-Z][A-Z].omf
    158 %endif
    159 
    160 %changelog
    161 * Mon Oct 12 2009 - brian.cameron@sun.com
    162 - Now use %{default_python_version}.
    163 * Mon Aug 31 2009 - brian.cameron@sun.com
    164 - Update to 0.10.6.
    165 * Mon Jun 08 2009 - brian.cameron@sun.com
    166 - Update to 0.10.5.1.
    167 * Tue Jun 02 2009 - brian.cameron@sun.com
    168 - Update to 0.10.5.
    169 * Fri Apr 03 2009 - laca@sun.com
    170 - stop depending on postrun
    171 * Fri Feb 27 2009 - brian.cameron@sun.com
    172 - Add patch codeina-02-exit.diff to fix doo bug #6847.
    173 * Sun Feb 22 2009 - dave.lin@sun.com
    174 - Changed BuildRequires: SUNWpython-notify to SUNWpython26-notify-devel
    175   because notify-python.pc moved to the latter.
    176 * Fri Feb 20 2009 - brian.cameron@sun.com
    177 - Add manpage.
    178 * Tue Jan 13 2008 - brian.cameron@sun.com
    179 - Bump to 0.10.4.  Remove upstream patches.
    180 * Fri Jan 02 2008 - brian.cameron@sun.com
    181 - Add patch codeina-06-arch.diff to support installing architecture
    182   specific plugins.
    183 * Mon Dec 22 2008 - brian.cameron@sun.com
    184 - Add patch codeina-04-fixexit.diff so that codeina exits properly and does
    185   not hang on exit.  Add patch codeina-05-nolsb.diff to avoid printing out
    186   an error message on startup that lsb_release does not exist on Solaris.
    187 * Tue Dec 16 2008 - dave.lin@sun.com
    188 - Add BuildRequires: SUNWpython-xdg.
    189 * Thu Dec 11 2008 - dave.lin@sun.com
    190 - Changed the source to internal one, it will be changed backed when
    191   community releases it.
    192 * Tue Nov 25 2008 - brian.cameron@sun.com
    193 - New spec file with version 0.10.3.1.
    194 
    195