raveit65 805eb3
# Conditional for release and snapshot builds. Uncomment for release-builds.
raveit65 8c21e7
%global rel_build 1
raveit65 805eb3
raveit65 805eb3
# This is needed, because src-url contains branched part of versioning-scheme.
raveit65 f3fe02
%global branch 1.8
raveit65 805eb3
raveit65 805eb3
# Settings used for build from snapshots.
raveit65 f3fe02
%{!?rel_build:%global commit 7ceb8fe98bdaf81e3e9a638f0abbfa657aa00ab2}
raveit65 f3fe02
%{!?rel_build:%global commit_date 20131511}
raveit65 805eb3
%{!?rel_build:%global shortcommit %(c=%{commit};echo ${c:0:7})}
raveit65 805eb3
%{!?rel_build:%global git_ver git%{commit_date}-%{shortcommit}}
raveit65 805eb3
%{!?rel_build:%global git_rel .git%{commit_date}.%{shortcommit}}
raveit65 805eb3
%{!?rel_build:%global git_tar %{name}-%{version}-%{git_ver}.tar.xz}
raveit65 805eb3
raveit65 805eb3
Summary:  Text editor for the MATE desktop
raveit65 805eb3
Name:     pluma
raveit65 f3fe02
Version:  %{branch}.1
raveit65 f3fe02
Release:  2%{?dist}
raveit65 8c21e7
#Release:  0.1%{?git_rel}%{?dist}
raveit65 805eb3
License:  GPLv2+ and LGPLv2+
raveit65 805eb3
Group:    Applications/Editors
raveit65 805eb3
URL:      http://mate-desktop.org
raveit65 805eb3
raveit65 805eb3
# for downloading the tarball use 'spectool -g -R pluma.spec'
raveit65 805eb3
# Source for release-builds.
raveit65 805eb3
%{?rel_build:Source0:     http://pub.mate-desktop.org/releases/%{branch}/%{name}-%{version}.tar.xz}
raveit65 805eb3
# Source for snapshot-builds.
raveit65 805eb3
%{!?rel_build:Source0:    http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}}
raveit65 805eb3
raveit65 805eb3
BuildRequires: desktop-file-utils
raveit65 805eb3
BuildRequires: enchant-devel
raveit65 805eb3
BuildRequires: libsoup-devel
raveit65 805eb3
BuildRequires: gtk2-devel
raveit65 5f4a8c
BuildRequires: gtksourceview3-devel
raveit65 805eb3
BuildRequires: iso-codes-devel
raveit65 805eb3
BuildRequires: libSM-devel
raveit65 805eb3
BuildRequires: mate-common
raveit65 805eb3
BuildRequires: pygobject2-devel
raveit65 5f4a8c
BuildRequires: pygtk2-devel
raveit65 805eb3
BuildRequires: pygtksourceview-devel
raveit65 805eb3
BuildRequires: python2-devel
raveit65 805eb3
BuildRequires: rarian-compat
raveit65 805eb3
BuildRequires: yelp-tools
raveit65 805eb3
raveit65 805eb3
Requires: %{name}-data = %{version}-%{release}
raveit65 805eb3
Requires: pygtk2
raveit65 805eb3
Requires: pygobject2
raveit65 805eb3
Requires: pygtksourceview
raveit65 805eb3
# needed to get a gsettings schema, #959607
raveit65 805eb3
Requires: mate-desktop-libs
raveit65 805eb3
# needed to get a gsettings schema, #959607
raveit65 805eb3
Requires: caja-schemas
raveit65 5f4a8c
# the run-command plugin uses mate-dialogs
raveit65 5f4a8c
Requires: mate-dialogs
raveit65 805eb3
raveit65 5f4a8c
%if 0%{?fedora} && 0%{?fedora} > 19
raveit65 805eb3
Provides:  mate-text-editor%{?_isa} = %{version}-%{release}
raveit65 805eb3
Provides:  mate-text-editor = %{version}-%{release}
raveit65 805eb3
Obsoletes: mate-text-editor < %{version}-%{release}
raveit65 805eb3
%endif
raveit65 805eb3
raveit65 805eb3
%description
raveit65 805eb3
mate-text-editor is a small, but powerful text editor designed specifically for
raveit65 805eb3
the MATE desktop. It has most standard text editor functions and fully
raveit65 805eb3
supports international text in Unicode. Advanced features include syntax
raveit65 805eb3
highlighting and automatic indentation of source code, printing and editing
raveit65 805eb3
of multiple documents in one window.
raveit65 805eb3
raveit65 805eb3
mate-text-editor is extensible through a plugin system, which currently includes
raveit65 805eb3
support for spell checking, comparing files, viewing CVS ChangeLogs, and
raveit65 805eb3
adjusting indentation levels.
raveit65 805eb3
raveit65 805eb3
%package data
raveit65 805eb3
Summary:   Data files for pluma
raveit65 805eb3
Group:     Applications/Editors
raveit65 805eb3
BuildArch: noarch
raveit65 805eb3
Requires:  %{name} = %{version}-%{release}
raveit65 805eb3
raveit65 805eb3
%description data
raveit65 805eb3
This package contains shared data needed for pluma.
raveit65 805eb3
raveit65 805eb3
%package devel
raveit65 805eb3
Summary:   Support for developing plugins for the mate-text-editor text editor
raveit65 805eb3
Group:     Development/Libraries
raveit65 805eb3
Requires:  %{name}%{?_isa} = %{version}-%{release}
raveit65 805eb3
Requires:  gtksourceview3-devel
raveit65 805eb3
Requires:  pygtk2-devel
raveit65 5449aa
%if 0%{?fedora} && 0%{?fedora} > 19
raveit65 805eb3
Provides:  mate-text-editor-devel%{?_isa} = %{version}-%{release}
raveit65 805eb3
Provides:  mate-text-editor-devel = %{version}-%{release}
raveit65 805eb3
Obsoletes: mate-text-editor-devel < %{version}-%{release}
raveit65 805eb3
%endif
raveit65 805eb3
raveit65 805eb3
%description devel
raveit65 805eb3
Development files for mate-text-editor
raveit65 805eb3
raveit65 805eb3
%prep
raveit65 805eb3
%setup -q%{!?rel_build:n %{name}-%{commit}}
raveit65 805eb3
raveit65 805eb3
# needed for git snapshots
raveit65 e0b5e2
#NOCONFIGURE=1 ./autogen.sh
raveit65 805eb3
raveit65 805eb3
# Fix debug permissions with messy hack 
raveit65 805eb3
find ./*/* -type f -exec chmod 644 {} \;
raveit65 805eb3
find ./*/*/* -type f -exec chmod 644 {} \;
raveit65 805eb3
raveit65 805eb3
raveit65 805eb3
%build
raveit65 805eb3
%configure \
raveit65 805eb3
        --disable-static          \
raveit65 805eb3
        --enable-gtk-doc-html     \
raveit65 805eb3
        --enable-gvfs-metadata    \
raveit65 805eb3
        --enable-python           \
raveit65 805eb3
        --disable-schemas-compile \
raveit65 805eb3
        --with-gtk=2.0
raveit65 805eb3
raveit65 805eb3
make %{?_smp_mflags} V=1
raveit65 805eb3
raveit65 805eb3
%install
raveit65 805eb3
%{make_install}
raveit65 805eb3
raveit65 805eb3
desktop-file-install                                \
raveit65 805eb3
    --delete-original                               \
raveit65 805eb3
    --dir %{buildroot}%{_datadir}/applications      \
raveit65 805eb3
%{buildroot}%{_datadir}/applications/*.desktop
raveit65 805eb3
raveit65 805eb3
# clean up all the static libs for plugins
raveit65 805eb3
find %{buildroot} -name '*.la' -exec rm -f {} ';'
raveit65 805eb3
find %{buildroot} -name '*.a' -exec rm -f {} ';'
raveit65 805eb3
raveit65 805eb3
# remove needless gsettings convert file
raveit65 805eb3
rm -f  %{buildroot}%{_datadir}/MateConf/gsettings/pluma.convert
raveit65 805eb3
raveit65 805eb3
%find_lang %{name} --with-gnome --all-name
raveit65 805eb3
raveit65 805eb3
raveit65 805eb3
%post
raveit65 805eb3
/usr/bin/update-desktop-database &> /dev/null || :
raveit65 805eb3
raveit65 805eb3
%postun
raveit65 805eb3
if [ $1 -eq 0 ] ; then
raveit65 805eb3
    /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
raveit65 805eb3
fi
raveit65 805eb3
/usr/bin/update-desktop-database &> /dev/null || :
raveit65 805eb3
raveit65 805eb3
%posttrans
raveit65 805eb3
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
raveit65 805eb3
raveit65 805eb3
%post data
raveit65 805eb3
/bin/touch --no-create %{_datadir}/pluma/icons &> /dev/null || :
raveit65 805eb3
raveit65 805eb3
%postun data
raveit65 805eb3
if [ $1 -eq 0 ] ; then
raveit65 805eb3
    /bin/touch --no-create %{_datadir}/pluma/icons &> /dev/null
raveit65 805eb3
    /usr/bin/gtk-update-icon-cache %{_datadir}/pluma/icons &> /dev/null || :
raveit65 805eb3
fi
raveit65 805eb3
raveit65 805eb3
%posttrans data
raveit65 805eb3
/usr/bin/gtk-update-icon-cache %{_datadir}/pluma/icons &>/dev/null || :
raveit65 805eb3
raveit65 805eb3
raveit65 805eb3
%files
raveit65 805eb3
%{_bindir}/pluma
raveit65 805eb3
%{_libdir}/pluma/
raveit65 805eb3
%{_libexecdir}/pluma/
raveit65 805eb3
%{_datadir}/applications/pluma.desktop
raveit65 805eb3
%{_datadir}/glib-2.0/schemas/org.mate.pluma.gschema.xml
raveit65 805eb3
%{_datadir}/glib-2.0/schemas/org.mate.pluma.plugins.filebrowser.gschema.xml
raveit65 805eb3
%{_datadir}/glib-2.0/schemas/org.mate.pluma.plugins.time.gschema.xml
raveit65 805eb3
raveit65 805eb3
%files data -f %{name}.lang
raveit65 805eb3
%doc README COPYING AUTHORS
raveit65 805eb3
%{_datadir}/pluma/
raveit65 805eb3
%{_mandir}/man1/pluma.1.*
raveit65 805eb3
raveit65 805eb3
%files devel
raveit65 805eb3
%{_includedir}/pluma/
raveit65 805eb3
%{_libdir}/pkgconfig/pluma.pc
raveit65 8c21e7
%{_datadir}/gtk-doc/html/pluma/
raveit65 805eb3
raveit65 805eb3
raveit65 805eb3
%changelog
raveit65 f3fe02
* Mon Jul 28 2014 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.8.1-2
raveit65 f3fe02
- build 1.8.1 release for f20
raveit65 5f4a8c
- update build requires
92733c
raveit65 99da0c
* Sun May 04 2014 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.8.1.1
raveit65 c7e983
- update to 1.8.1 release
raveit65 c7e983
Dan Mashal 708fa6
* Wed Mar 05 2014 Dan Mashal <dan.mashal@fedoraproject.org> - 1.8.0-1
Dan Mashal 708fa6
- Update to 1.8.0
Dan Mashal 708fa6
raveit65 0f78d0
* Wed Feb 19 2014 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.7.90-1
raveit65 0f78d0
- update to 1.7.90
raveit65 3f44f1
- remove obsolete mate-text-editor binary from spec file
raveit65 0f78d0
raveit65 805eb3
* Thu Feb 13 2014 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.7.2-1
raveit65 805eb3
- update to 1.7.2 release
raveit65 805eb3
- fix rpmlint warning 'can't find source0'
raveit65 805eb3
- fix license information
raveit65 805eb3
- use a joker for the man file attribute
raveit65 805eb3
- move data in a noarch subpackage
raveit65 805eb3
- improve obsoletes
raveit65 805eb3
- update rpm scriplets
raveit65 805eb3
raveit65 805eb3
* Wed Dec 25 2013 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.7.1-1
raveit65 805eb3
- update to 1.7.1 release
raveit65 805eb3
- add gtk-doc dir to -devel subpackage for release builds
raveit65 805eb3
raveit65 805eb3
* Wed Dec 25 2013 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.7.1-0.1.git20131511.7ceb8fe
raveit65 805eb3
- rename to pluma
raveit65 805eb3
- make maintainers life easier and use better git snapshot usage, thanks to Bjรถrn Esser
raveit65 805eb3
- simplify remove of static libaries
raveit65 805eb3
- use modern 'make install' macro
raveit65 805eb3
- add --with-gnome flag to find_language, needed for yelp
raveit65 805eb3
- sort file section
raveit65 805eb3
raveit65 805eb3
* Fri Dec 06 2013 Dan Mashal <dan.mashal@fedoraproject.org> - 1.7.0-1
raveit65 805eb3
- Update to 1.7.0
raveit65 805eb3
raveit65 805eb3
* Thu Aug 08 2013 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.6.0-5
raveit65 805eb3
- add runtime require mate-file-manager-schemas to fix #959607
raveit65 805eb3
raveit65 805eb3
* Thu Aug 08 2013 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.6.0-4
raveit65 805eb3
- switch to runtime require mate-desktop-libs
raveit65 805eb3
- remove needless --with-gnome flag in find_language 
raveit65 805eb3
raveit65 805eb3
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.0-3
raveit65 805eb3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
raveit65 805eb3
raveit65 805eb3
* Sun Jun 30 2013 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.6.0-2
raveit65 805eb3
- add runtime require mate-desktop, fix rhbz #959607
raveit65 805eb3
- remove pluma.convert files
raveit65 805eb3
- cleanup BR's
raveit65 805eb3
- fix desktop file install command, no needed to add X-MATE
raveit65 805eb3
- use runtime require mate-dialogs instead of zenity
raveit65 805eb3
- remove BR mate-conf-devel
raveit65 805eb3
- add --disable-static configure flag
raveit65 805eb3
- general usage of %%{buildroot}
raveit65 805eb3
- no need of mimeinfo rpm scriptlets
raveit65 805eb3
- fix desktop-database rpm scriptlets
raveit65 805eb3
- update BR's 
raveit65 805eb3
- add isa tag to -devel subpackage
raveit65 805eb3
raveit65 805eb3
* Sat Apr 13 2013 Dan Mashal <dan.mashal@fedoraproject.org> - 1.6.0-1
raveit65 805eb3
- Update to latest 1.6.0 stable release.
raveit65 805eb3
raveit65 805eb3
* Sun Feb 10 2013 Dan Mashal <dan.mashal@fedoraproject.org> - 1.5.1-1
raveit65 805eb3
- Update to latest upstream release
raveit65 805eb3
raveit65 805eb3
* Mon Oct 15 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.4.0-2
raveit65 805eb3
- Fix build requires
raveit65 805eb3
raveit65 805eb3
* Sun Oct 14 2012 Leigh Scott <leigh123linux@googlemail.com> - 1.4.0-1
raveit65 805eb3
- Initial build
raveit65 805eb3
raveit65 805eb3