cherrytree/cherrytree.spec

93 lines
2.7 KiB
RPMSpec
Raw Normal View History

2018-04-15 13:06:43 +07:00
Name: cherrytree
Version: 0.38.4
Release: 1
Summary: Hierarchical note taking application
License: GPLv3+
Group: Office
URL: http://www.giuspen.com/cherrytree/
Source0: http://www.giuspen.com/software/%name-%version.tar.xz
Source1: CherrytreeManual.ctb.tar.xz
Source2: %name-%version-%name.1
Source3: README.install.urpmi
Patch0: %name-%version-desktop.patch
BuildArch: noarch
BuildRequires: python
BuildRequires: python-devel
BuildRequires: gettext
Requires: python
Requires: p7zip
Requires: pygtk2.0
Requires: python-appindicator
Requires: python-chardet
Requires: python-dbus
Requires: python-enchant
Requires: python-gobject
Requires: python-gtksourceview
Requires: sqlite-tools
Requires(post): desktop-file-utils
Requires(post): gtk-update-icon-cache
Requires(post): shared-mime-info
Requires(postun): desktop-file-utils
Requires(postun): gtk-update-icon-cache
Requires(postun): shared-mime-info
2013-01-10 13:42:37 +00:00
%description
Cherrytree is a hierarchical note taking application. The Main Features:
* Rich Text supporting Images, Tables, Code Boxes, Hyperlinks and Anchors,
Spell Check, Lists.
* Syntax Highlighting supporting many programming languages.
* Password Protection, Powerful Find and Replace utilities, TOC generator.
* Print, Save as PDF, Export to HTML, Export to Plain Text.
* Import from Several other Note Taking Applications.
%files -f %name.lang
%_bindir/%{name}
2018-04-15 13:06:43 +07:00
%{_datadir}/appdata/%name.appdata.xml
%{_datadir}/applications/%name.desktop
%{_datadir}/%name/glade/*
%{_datadir}/%name/language-specs/*
%{_datadir}/%name/modules/*
%{_iconsdir}/hicolor/scalable/apps/%name.svg
%{_datadir}/mime/packages/%name.xml
%{_mandir}/man1/*.1.xz
%{_mandir}/ru/man1/%name.1.xz
%{py_puresitedir}/CherryTree-%version-py2.7.egg-info
%doc changelog.txt license.txt CherrytreeManual.ctb README.install.urpmi
#----------------------------------------------------------------------------
2013-01-10 13:42:37 +00:00
%prep
%setup -q -a 1
2018-04-15 13:06:43 +07:00
%patch0 -p1
2013-01-10 13:42:37 +00:00
%build
2013-01-11 01:04:28 +11:00
python setup.py build
2013-01-10 13:42:37 +00:00
%install
%__python2 setup.py install --prefix=%buildroot/usr -f
# These are no longer in use
rm -rf %buildroot%{_datadir}/application-registry
rm -rf %buildroot%{_datadir}/mime-info
# Menu entry check
desktop-file-validate %buildroot%{_datadir}/applications/%name.desktop
# Fix icon file permissions
chmod 0644 %buildroot%{_iconsdir}/hicolor/scalable/apps/%name.svg
# Add man in Russian
2018-04-15 13:06:43 +07:00
install -D %SOURCE2 %buildroot%{_mandir}/ru/man1/%name.1
cp -a %SOURCE3 $RPM_BUILD_DIR/%name-%version
%find_lang %name
2013-01-10 13:42:37 +00:00
%post
2018-04-15 13:06:43 +07:00
%_update_desktop_database_bin %_datadir/applications
%_update_icon_cache_bin %_iconsdir/hicolor
%_update_mime_database_bin -n %_datadir/mime
2013-11-03 11:09:36 +01:00
%postun
if [ $1 = 0 ]; then
2018-04-15 13:06:43 +07:00
%_update_desktop_database_bin %_datadir/applications
%_update_icon_cache_bin %_iconsdir/hicolor
%_update_mime_database_bin %_datadir/mime
fi
2015-01-03 23:11:28 +04:00