File notecase.spec of Package notecase

# NoteCase RPM spec file.

Name:           notecase
Version:        1.9.8
Release:        1
Summary:        A hierarchical text notes manager
Group:          Applications/Productivity
License:        BSD
URL:            http://notecase.sourceforge.net/
Source:         %{name}-%{version}_src.tar.gz
Icon:           notecase.xpm
BuildRequires:  gtk2-devel >= 2.4 desktop-file-utils shared-mime-info gettext gnome-vfs2-devel 
BuildRequires:  gcc-c++
BuildRequires:	gtksourceview-devel
Requires:       gtk2 gettext
Patch1:		001-notecase-desktop.diff
Patch2:		gcc44.patch
Patch3:		disable_version_check.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
NoteCase is a hierarchical text notes manager (outliner). 
It helps you organize your everyday text notes into a single document with individual notes placed into a 
tree-like structure. To ensure your privacy an encrypted document format is supported along
with a standard unencrypted one.

%prep
%setup -n %{name}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
mv po/no.po po/nb.po

%build
%{__make} CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

%install
%{makeinstall}
desktop-file-install --vendor="" \
  --dir=%{buildroot}%{_datadir}/applications \
  --delete-original \
  --remove-category=Office \
  --add-category=TextEditor \
  %{buildroot}%{_datadir}/applications/notecase.desktop
%find_lang %{name}

%post
#add notecase into mime database
update-mime-database %{_datadir}/mime/ &> /dev/null || :
update-desktop-database &> /dev/null || :

%postun
#remove notecase from mime database
update-mime-database %{_datadir}/mime/ &> /dev/null || :
update-desktop-database &> /dev/null || :

%clean
%{__rm} -rf "%{buildroot}"

%files -f %{name}.lang
%defattr(-, root, root)
%{_bindir}/notecase
%dir %{_docdir}/notecase
%{_docdir}/notecase/help.ncd
%{_datadir}/pixmaps/notecase.xpm
%{_datadir}/applications/notecase.desktop
%{_datadir}/mime/packages/notecase.xml

%changelog -n notecase.changes
openSUSE Build Service is sponsored by