Home | History | Annotate | Download | only in core
      1 #
      2 # spec file for package SUNWjokosher
      3 #
      4 %define owner yippi
      5 #
      6 # includes module(s): jokosher
      7 #
      8 # bugdb: https://bugs.launchpad.net/jokosher
      9 #
     10 %include Solaris.inc
     11 
     12 Name:           SUNWjokosher
     13 License:        GPL v2
     14 Group:          System/GUI/GNOME
     15 Version:        0.11.3
     16 Distribution:   Java Desktop System
     17 Vendor:         Sun Microsystems, Inc.
     18 Summary:        Jokosher is a multi-track studio application
     19 Source0:        http://launchpad.net/jokosher/0.11/%{version}/+download/jokosher-%{version}.tar.gz
     20 Source1:        FreesoundSearch-0.3-py2.6.egg
     21 Patch1:         jokosher-01-byteorder.diff
     22 SUNW_Copyright: %{name}.copyright
     23 URL:            http://jokosher.org
     24 BuildRoot:      %{_tmppath}/jokosher-%{version}-build
     25 SUNW_BaseDir:   %{_basedir}
     26 
     27 Requires:       SUNWPython
     28 Requires:       SUNWdbus-python26
     29 Requires:       SUNWgnome-media
     30 Requires:       SUNWgnome-python26-libs
     31 Requires:       SUNWgst-python26
     32 Requires:       SUNWgnonlin
     33 Requires:       SUNWpython26-setuptools
     34 BuildRequires:  SUNWPython26-devel
     35 BUildRequires:  SUNWdbus-python26-devel
     36 BuildRequires:  SUNWgnome-media-devel
     37 BuildRequires:  SUNWgnome-python26-libs-devel
     38 BuildRequires:  SUNWgst-python26-devel
     39 BuildRequires:  SUNWpython26-setuptools
     40 BuildRequires:  SUNWgnonlin
     41 
     42 %include default-depend.inc
     43 
     44 %description
     45 Jokosher is a simple yet powerful multi-track studio. 
     46 
     47 %if %build_l10n
     48 %package l10n
     49 Summary:                 %{summary} - l10n files
     50 SUNW_BaseDir:            %{_basedir}
     51 %include default-depend.inc
     52 Requires:                %{name}
     53 %endif
     54 
     55 %prep
     56 %setup -q -n jokosher-%version
     57 %patch1 -p1
     58 
     59 # Replace the Freesound extension with a version which has been modified to not
     60 # save the FreeSound username/password information in plaintext in the user's
     61 # $HOME/.local/share/jokosher/extension-config/Extension.config file.
     62 # Following are instructions on how to rebuild this egg file if needed.
     63 #
     64 # Run "bzr branch lp:jokosher" to get the jokosher code from BZR, modify the
     65 # file extensions/eggs/FreesoundSearch/src/FreesoundSearch.py so that the
     66 # following lines are commented out from the function FinishLogin():
     67 # 
     68 #                       self.api.set_config_value("fsUsername", username)
     69 #                       self.api.set_config_value("fsPassword", password)
     70 #
     71 # Then run python2.6 setup.py bdist_egg in the extensions/eggs/FreeSoundSearch
     72 # directory to rebuild the egg file.  The jokosher team plans to fix this
     73 # plugin to use gnome-keyring in version 0.12, so the need to patch the code
     74 # this way should no longer be needed when that happens.
     75 # 
     76 rm extensions/FreesoundSearch-0.3-py2.6.egg
     77 cp %{SOURCE1} extensions
     78 
     79 %build
     80 python%{default_python_version} setup.py build
     81 
     82 %install
     83 rm -rf $RPM_BUILD_ROOT
     84 python%{default_python_version} setup.py install --root=%{buildroot}
     85 
     86 desktop-file-install \
     87   --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/*
     88 
     89 # move to vendor-packages
     90 mkdir -p $RPM_BUILD_ROOT%{_libdir}/python%{default_python_version}/vendor-packages
     91 mv $RPM_BUILD_ROOT%{_libdir}/python%{default_python_version}/site-packages/* \
     92    $RPM_BUILD_ROOT%{_libdir}/python%{default_python_version}/vendor-packages/
     93 rmdir $RPM_BUILD_ROOT%{_libdir}/python%{default_python_version}/site-packages
     94 
     95 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
     96 
     97 %if %build_l10n
     98 %else
     99 # REMOVE l10n FILES
    100 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
    101 find $RPM_BUILD_ROOT%{_datadir}/gnome/help/jokosher/* -type d ! -name 'C' -prune \
    102     | xargs rm -rf
    103 find $RPM_BUILD_ROOT%{_datadir}/omf/jokosher/* -type f ! -name '*-C.omf' \
    104     | xargs rm -f
    105 %endif
    106 
    107 %clean
    108 rm -rf %{buildroot}
    109 
    110 %post
    111 ( echo 'test -x /usr/bin/gtk-update-icon-cache || exit 0';
    112   echo '/usr/bin/gtk-update-icon-cache --force %{_datadir}/icons/hicolor'
    113 ) | $PKG_INSTALL_ROOT/usr/lib/postrun -b -u -t 5
    114 ( echo 'test -x /usr/bin/update-desktop-database || exit 0';
    115   echo '/usr/bin/update-desktop-database'
    116 ) | $BASEDIR/lib/postrun -b -u -c JDS_wait
    117 ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
    118   echo '/usr/bin/scrollkeeper-update'
    119 ) | $BASEDIR/lib/postrun -b -u -c JDS
    120 
    121 %postun
    122 test -x $BASEDIR/lib/postrun || exit 0
    123 ( echo 'test -x /usr/bin/update-desktop-database || exit 0';
    124   echo '/usr/bin/update-desktop-database'
    125 ) | $BASEDIR/lib/postrun -b -u -c JDS
    126 ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
    127   echo '/usr/bin/scrollkeeper-update'
    128 ) | $BASEDIR/lib/postrun -b -u -c JDS
    129 
    130 %files
    131 %defattr(-,root,bin)
    132 %dir %attr (0755, root, bin) %{_bindir}
    133 %{_bindir}/jokosher
    134 
    135 %dir %attr (0755, root, bin) %{_libdir}
    136 %{_libdir}/python%{default_python_version}/vendor-packages/Jokosher
    137 %{_libdir}/python%{default_python_version}/vendor-packages/jokosher*egg-info
    138 
    139 %dir %attr (0755, root, sys) %{_datadir}
    140 %dir %attr (0755, root, other) %{_datadir}/applications
    141 %{_datadir}/applications/*
    142 %attr (-, root, other) %{_datadir}/icons
    143 %{_datadir}/jokosher
    144 %dir %attr (0755, root, root) %{_datadir}/mime
    145 %dir %attr (0755, root, root) %{_datadir}/mime/packages
    146 %{_datadir}/mime/packages/*
    147 %dir %attr (0755, root, other) %{_datadir}/pixmaps
    148 %{_datadir}/pixmaps/*
    149 %dir %attr (0755, root, other) %{_datadir}/gnome
    150 %{_datadir}/gnome/help/jokosher/C
    151 %{_datadir}/omf/jokosher/*-C.omf
    152 %doc AUTHORS README
    153 %doc(bzip2) COPYING COPYING-DOCS
    154 %dir %attr (0755, root, other) %{_datadir}/doc
    155 
    156 %if %build_l10n
    157 %files l10n
    158 %defattr (-, root, bin)
    159 %dir %attr (0755, root, sys) %{_datadir}
    160 %attr (-, root, other) %{_datadir}/locale
    161 %dir %attr (0755, root, other) %{_datadir}/gnome
    162 %endif
    163 
    164 %changelog
    165 * Mon Oct 12 2009 - brian.cameron@sun.com
    166 - Now use %{default_python_version}.
    167 * Mon Aug 17 2009 - brian.cameron@sun.com
    168 - Add copyright file, minor cleanup.
    169 * Mon Jun 15 2009 - brian.cameron@sun.com
    170 - Add patch jokosher-01-byteorder.diff so that Jokosher works on Sparc.
    171 * Thu Jun 04 2009 - brian.cameron@sun.com
    172 - Bump to 0.11.3.
    173 * Tue May 12 2009 - brian.cameron@sun.com
    174 - Now build with Python 2.6.
    175 * Thu Mar 19 2009 - brian.cameron@sun.com
    176 - Bump to 0.11.1.
    177 * Sun Mar 01 2009 - brian.cameron@sun.com
    178 - Bump to 0.11.
    179 * Tue Sep 30 2008 - brian.cameron@sun.com
    180 - Bump to 0.10.1
    181 * Fri Aug 29 2008 - brian.cameron@sun.com
    182 - Bump to 0.10.  Yay!  Remove patch jokosher-01-fixdesktop.diff as it is no
    183   longer needed.
    184 * Thu Apr 10 2008 - brian.cameron@sun.com
    185 - Change SFEgst-python to SUNWgst-python.
    186 * Thu Feb 07 2008 - brian.cameron@sun.com.
    187 - Add jokosher-01-fixdesktop.diff file so package builds.
    188 * Wed Nov 14 2007 - daymobrew@users.sourceforge.net
    189 - Add l10n package.
    190 * Sat Sep 01 2007 - trisk@acm.jhu.edu
    191 - Fix help and l10n install rules
    192 * Wed Aug 15 2007 - trisk@acm.jhu.edu
    193 - Update dependencies and paths
    194 * Tue Jul 10 2007 Brian Cameron <brian.cameron@sun.com>
    195 - New spec file.
    196