Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > e1c5ef7eeb19540361352e9ed217a6cb > files > 2

efte-1.1-1.fc13.src.rpm

Name:		efte
Version:	1.1
Release:	1%{?dist}
Summary:	A lightweight, extendable, folding text editor for X11
Group:		Applications/Editors
License:	GPLv2+ or Artistic
URL:		http://efte.cowgar.com
Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

BuildRequires:	cmake
BuildRequires:	desktop-file-utils
BuildRequires:	gpm-devel
BuildRequires:	ncurses-devel
BuildRequires:	libICE-devel
BuildRequires:	libSM-devel
BuildRequires:	libXext-devel
BuildRequires:	libX11-devel
BuildRequires:	libXpm-devel

Provides:	efte(binary) = %{version}-%{release}
Requires:	efte-common = %{version}-%{release}
# Needed for fonts to show correctly
Requires:	xorg-x11-fonts-misc

# Branch nefte on its own since it has less dependencies
%package -n nefte
Summary:	A lightweight, extendable, folding text editor
Group:		Applications/Editors
Provides:	efte(binary) = %{version}-%{release}
Requires:	efte-common = %{version}-%{release}

# .. which makes a common data package necessary
%package common
Summary:	Common data files for efte/nefte
Group:		Applications/Editors
# Make the common package get removed when the editors are removed
Requires:	efte(binary) = %{version}-%{release}
%if 0%{?fedora} > 10
BuildArch:	noarch
%endif

%description
eFTE is an advanced programmers editor with goals of being lightweight, yet
totally configurable. Support for user defined programming languages, menu
systems and key bindings are provided with many common defaults already
defined. eFTE is still a new project, however, we extend from the FTE editor
which was first released in 1995, so eFTE is tried and true with many features
for the programmer/text editor. 

This package contains efte, the X11 version of the editor.

%description -n nefte
eFTE is an advanced programmers editor with goals of being lightweight, yet
totally configurable. Support for user defined programming languages, menu
systems and key bindings are provided with many common defaults already
defined. eFTE is still a new project, however, we extend from the FTE editor
which was first released in 1995, so eFTE is tried and true with many features
for the programmer/text editor.

This package contains nefte, the ncurses version of the editor.

%description common
eFTE is an advanced programmers editor with goals of being lightweight, yet
totally configurable. Support for user defined programming languages, menu
systems and key bindings are provided with many common defaults already
defined. eFTE is still a new project, however, we extend from the FTE editor
which was first released in 1995, so eFTE is tried and true with many features
for the programmer/text editor.

This package contains common datafiles for efte.

%prep
%setup -q
# Character set conversion
for doc in Artistic AUTHORS COPYING HISTORY INSTALL README; do
 iconv -f ASCII -t UTF-8 $doc > $doc.new && \
 touch -r $doc $doc.new && \
 mv $doc.new $doc
done
# Delete version line from desktop file
sed -i '/Version/d' packaging/shared/efte.desktop
# Append encoding line to desktop file (necessary for EPEL)
echo "Encoding=UTF-8" >> packaging/shared/efte.desktop
# Remove optflags lines from cmake configs
sed -i '/CMAKE_CXX_FLAGS/d' src/CMakeLists.txt

%build
# Need this to build
export CFLAGS="%{optflags} -DHAVE_STRICMP"
export CXXFLAGS="$CFLAGS"

cd src
%{cmake} ..
cd ..

make -C src %{?_smp_mflags} 

%install
rm -rf %{buildroot}
make -C src install DESTDIR=%{buildroot} INSTALL="install -p"
# Remove installed docdir
rm -rf %{buildroot}%{_docdir}/%{name}
# Verify desktop file
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop

# vefte works only in virtual consoles, requires special permissions to
# /dev/vcsa*, and has a garbled display. Don't include it in the rpm, since
# nefte offers same functionality and works everywhere.
rm %{buildroot}%{_bindir}/vefte

%clean
rm -rf %{buildroot}

# Update desktop mime database
%post
update-desktop-database &> /dev/null || :

%postun
update-desktop-database &> /dev/null || :

%files
%defattr(-,root,root,-)
%{_bindir}/efte
%{_datadir}/applications/efte.desktop
%{_datadir}/pixmaps/efte*.xpm

%files -n nefte
%defattr(-,root,root,-)
%{_bindir}/nefte

%files common
%defattr(-,root,root,-)
%doc Artistic AUTHORS COPYING HISTORY README
%{_datadir}/efte/

%changelog
* Sun Oct 11 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.1-1
- Update to 1.1 which fixes a buffer overflow.

* Thu Aug 06 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-7
- Added Requires: xorg-x11-fonts-misc.

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Jul 16 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-5
- Fix EPEL build.

* Tue Jun 23 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-4
- Fix review issues.
- Branch nefte into an own package.

* Sun Jun 21 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-3
- Don't ship %%{_bindir}/vefte which is broken.

* Sun Jun 21 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-2
- Use -DHAVE_STRICMP instead of -fno-exceptions.

* Wed Jun 17 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.0-1
- First release.