a327ba2
%if !( 0%{?rhel} > 0 && 0%{?rhel} <= 7)
0a882e6
# Turn off the brp-python-bytecompile script
0a882e6
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
70633a7
%endif
70633a7
0a882e6
8b51490
Name:           liblouis
e3437ee
Version:        2.6.0
e3437ee
Release:        1%{?dist}
8b51490
Summary:        Braille translation and back-translation library
8b51490
8b51490
Group:          System Environment/Libraries
8b51490
License:        LGPLv3+
8b51490
URL:            http://www.abilitiessoft.com/
45250bb
Source0:        http://liblouis.googlecode.com/files/%{name}-%{version}.tar.gz
8b51490
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
8b51490
d4204be
BuildRequires:  chrpath
8b51490
BuildRequires:  help2man
8b51490
BuildRequires:  texinfo-tex
45250bb
BuildRequires:  python2-devel
70633a7
a327ba2
%if !( 0%{?rhel} > 0 && 0%{?rhel} <= 7)
0a882e6
BuildRequires:  python3-devel
7af66a3
%endif
70633a7
8b51490
Requires(post): info
8b51490
Requires(preun): info
8b51490
8b51490
# gnulib is a copylib that has been granted an exception from the no-bundled-libraries policy
8b51490
# http://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Copylibs
d4204be
Provides: bundled(gnulib) = 20130621
8b51490
8b51490
%description
d4204be
Liblouis is an open-source braille translator and back-translator named in
d4204be
honor of Louis Braille. It features support for computer and literary braille,
d4204be
supports contracted and uncontracted translation for many languages and has
d4204be
support for hyphenation. New languages can easily be added through tables that
d4204be
support a rule- or dictionary based approach. Liblouis also supports math
d4204be
braille (Nemeth and Marburg).
8b51490
d4204be
Liblouis has features to support screen-reading programs. This has led to its
d4204be
use in two open-source screen readers, NVDA and Orca. It is also used in some
d4204be
commercial assistive technology applications for example by ViewPlus.
8b51490
d4204be
Liblouis is based on the translation routines in the BRLTTY screen reader for
d4204be
Linux. It has, however, gone far beyond these routines.
8b51490
8b51490
%package        devel
8b51490
Summary:        Development files for %{name}
8b51490
Group:          Development/Libraries
2627ccf
Requires:       %{name}%{?_isa} = %{version}-%{release}
8b51490
Requires:       pkgconfig
8b51490
8b51490
%description    devel
8b51490
The %{name}-devel package contains libraries and header files for
8b51490
developing applications that use %{name}.
8b51490
8b51490
8b51490
%package        utils
8b51490
Summary:        Command-line utilities to test %{name}
8b51490
Group:          Applications/Text
64e6a98
Requires:       %{name}%{?_isa} = %{version}-%{release}
d4204be
Requires:       %{name}-python = %{version}-%{release}
8b51490
License:        GPLv3+
8b51490
8b51490
%description    utils
d4204be
Six test programs are provided as part of the liblouis package. They
8b51490
are intended for testing liblouis and for debugging tables. None of
8b51490
them is suitable for braille transcription.
8b51490
8b51490
%package python
0a882e6
Summary:        Python 2 language bindings for %{name}
8b51490
Group:          Development/Languages
8b51490
BuildArch:      noarch
8b51490
Requires:       %{name} = %{version}-%{release}
8b51490
8b51490
%description python
0a882e6
This package provides Python 2 language bindings for %{name}.
0a882e6
0a882e6
a327ba2
%if !( 0%{?rhel} > 0 && 0%{?rhel} <= 7)
0a882e6
%package python3
0a882e6
Summary:        Python 3 language bindings for %{name}
0a882e6
Group:          Development/Languages
0a882e6
BuildArch:      noarch
0a882e6
Requires:       %{name} = %{version}-%{release}
0a882e6
0a882e6
%description python3
0a882e6
This package provides Python 3 language bindings for %{name}.
7af66a3
%endif
8b51490
8b51490
caa46d2
%package doc
caa46d2
Summary:        Documentation for %{name}
caa46d2
Group:          Documentation
caa46d2
BuildArch:      noarch
caa46d2
Requires:       %{name} = %{version}-%{release}
caa46d2
caa46d2
%description doc
caa46d2
This package provides the documentation for liblouis.
caa46d2
caa46d2
8b51490
%prep
8b51490
%setup -q
8b51490
8b51490
8b51490
%build
8b51490
%configure --disable-static --enable-ucs4
8b51490
make %{?_smp_mflags}
8b51490
make -C doc %{name}.pdf
8b51490
d4204be
d4204be
%check
d4204be
make check
8b51490
8b51490
8b51490
%install
8b51490
rm -rf %{buildroot}
8b51490
make install DESTDIR=%{buildroot}
8b51490
rm -f %{buildroot}/%{_infodir}/dir
8b51490
rm -f %{buildroot}/%{_libdir}/%{name}.la
8b51490
rm -rf %{buildroot}/%{_defaultdocdir}/%{name}/
8b51490
cd python/louis
0a882e6
8b51490
install -d %{buildroot}%{python_sitelib}/louis
8b51490
install -pm 0644 __init__.py %{buildroot}%{python_sitelib}/louis/
70633a7
a327ba2
%if !( 0%{?rhel} > 0 && 0%{?rhel} <= 7)
0a882e6
%py_byte_compile %{__python} %{buildroot}%{python_sitelib}/louis/
0a882e6
0a882e6
install -d %{buildroot}%{python3_sitelib}/louis
0a882e6
install -pm 0644 __init__.py %{buildroot}%{python3_sitelib}/louis/
0a882e6
%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/louis/
7af66a3
%endif
8b51490
d4204be
# Remove Rpaths from the executables. We must do that in the %%install section
d4204be
# because, otherwise, the test suite wouldn't build.
1ca20fc
for f in `find %{buildroot}%{_bindir} -exec file {} \; | grep 'ELF.*executable' | cut -d: -f1`; do
d4204be
	chrpath --delete $f
d4204be
done
d4204be
8b51490
8b51490
%clean
8b51490
rm -rf %{buildroot}
8b51490
8b51490
8b51490
%post
8b51490
/sbin/ldconfig
8b51490
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
8b51490
8b51490
8b51490
%postun -p /sbin/ldconfig
8b51490
8b51490
8b51490
%preun
8b51490
if [ $1 = 0 ] ; then
8b51490
  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
8b51490
fi
8b51490
8b51490
8b51490
%files
8b51490
%defattr(-,root,root,-)
d4204be
%doc README COPYING.LESSER AUTHORS NEWS ChangeLog TODO
8b51490
%{_libdir}/%{name}.so.*
8b51490
%{_datadir}/%{name}/
8b51490
%{_infodir}/%{name}.info*
8b51490
8b51490
%files devel
d4204be
%doc HACKING
8b51490
%defattr(-,root,root,-)
8b51490
%{_includedir}/%{name}/
8b51490
%{_libdir}/pkgconfig/%{name}.pc
8b51490
%{_libdir}/%{name}.so
8b51490
8b51490
%files utils
8b51490
%defattr(-,root,root,-)
8b51490
%doc COPYING
8b51490
%{_bindir}/lou_*
8b51490
%{_mandir}/man1/lou_*.1*
8b51490
8b51490
%files python
8b51490
%defattr(-,root,root,-)
8b51490
%doc python/README
8b51490
%{python_sitelib}/louis/
8b51490
a327ba2
%if !( 0%{?rhel} > 0 && 0%{?rhel} <= 7)
0a882e6
%files python3
0a882e6
%defattr(-,root,root,-)
0a882e6
%{python3_sitelib}/louis/
7af66a3
%endif
0a882e6
caa46d2
%files doc
caa46d2
%doc doc/%{name}.{html,txt,pdf}
caa46d2
8b51490
8b51490
%changelog
e3437ee
* Tue Sep 16 2014 Martin Gieseking <martin.gieseking@uos.de> 2.6.0-1
e3437ee
- Updated to new upstream release.
e3437ee
1ca20fc
* Mon Aug 18 2014 Martin Gieseking <martin.gieseking@uos.de> 2.5.4-5
1ca20fc
- Fixed check for ELF binaries to prevent chrpath from failing.
1ca20fc
82046f9
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.4-4
82046f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
82046f9
2dda2cd
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.4-3
2dda2cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2dda2cd
dd8c92b
* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 2.5.4-2
dd8c92b
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
dd8c92b
d4204be
* Tue May 13 2014 Martin Gieseking <martin.gieseking@uos.de> 2.5.4-1
d4204be
- Updated to new upstream release.
d4204be
- Activated the bundled test suite which has been adapted to work correctly with the recent release. 
d4204be
- Remove Rpaths from the utility programs.
d4204be
- Updated the description according to the upstream website.
d4204be
bbbff2f
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.3-2
bbbff2f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
bbbff2f
6c1c3ac
* Mon Jul 22 2013 Martin Gieseking <martin.gieseking@uos.de> - 2.5.3-1
6c1c3ac
- Update to new upstream release.
6c1c3ac
64e6a98
* Thu Jul 18 2013 Matthias Clasen <mclasen@redhat.com> - 2.5.2-7
64e6a98
- Tighten dependencies between subpackages (pointed out by rpmdiff)
64e6a98
a327ba2
* Tue Apr 16 2013 Martin Gieseking <martin.gieseking@uos.de> 2.5.2-6
a327ba2
- Restrict exclusion of Python 3 packages to RHEL <= 7.
a327ba2
70633a7
* Mon Apr 15 2013 Martin Gieseking <martin.gieseking@uos.de> 2.5.2-5
70633a7
- Restrict exclusion of Python 3 packages to RHEL < 7.
70633a7
7af66a3
* Mon Apr 15 2013 Rui Matos <rmatos@redhat.com> - 2.5.2-4
70633a7
- Don't depend on python3 in RHEL.
7af66a3
0a882e6
* Tue Feb 26 2013 Martin Gieseking <martin.gieseking@uos.de> 2.5.2-3
0a882e6
- Added Python 3 language bindings.
0a882e6
caa46d2
* Fri Feb 22 2013 Martin Gieseking <martin.gieseking@uos.de> 2.5.2-2
caa46d2
- Moved documentation to doc subpackage.
caa46d2
45250bb
* Wed Feb 06 2013 Martin Gieseking <martin.gieseking@uos.de> 2.5.2-1
45250bb
- Updated to new upstream release.
45250bb
13776ff
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-2
13776ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
13776ff
2627ccf
* Sat Mar 10 2012 Martin Gieseking <martin.gieseking@uos.de> 2.4.1-1
2627ccf
- Updated to upstream release 2.4.1.
2627ccf
- Made the devel package's dependency on the base package arch specific.
2627ccf
a651a53
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.0-2
a651a53
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a651a53
7f0804f
* Mon Dec 12 2011 Martin Gieseking <martin.gieseking@uos.de> 2.4.0-1
7f0804f
- Updated to upstream release 2.4.0.
7f0804f
e806819
* Fri May 20 2011 Martin Gieseking <martin.gieseking@uos.de> 2.3.0-1
e806819
- Updated to upstream release 2.3.0.
e806819
8b51490
* Mon Feb 28 2011 Martin Gieseking <martin.gieseking@uos.de> - 2.2.0-2
8b51490
- Added release date of bundled gnulib to Provides.
8b51490
- Use %%{name} macro consistently.
8b51490
8b51490
* Tue Feb 15 2011 Martin Gieseking <martin.gieseking@uos.de> - 2.2.0-1
8b51490
- Updated to upstream release 2.2.0.
8b51490
- Added Python bindings.
8b51490
8b51490
* Mon Jul 5 2010 Lars Bjørndal <lars.bjorndal@broadpark.no> - 1.9.0-2
8b51490
- In advice from Martin Gieseking: Removed some garbage from the file section, and added a PDF version of the liblouis documentation. See <https://bugzilla.redhat.com/show_bug.cgi?id=597597>.
8b51490
8b51490
* Wed Jun 30 2010 Lars Bjørndal <lars.bjorndal@broadpark.no> - 1.9.0-1
8b51490
- A new version was up to day. At the same time, fixed a minor spec issue according to a comment from Martin Gieseking, see <https://bugzilla.redhat.com/show_bug.cgi?id=597597>.
8b51490
8b51490
* Sun Jun 20 2010 Lars Bjørndal <lars.bjorndal@broadpark.no> - 1.8.0-3
8b51490
- Fixed some small problems, among them wrong destination directory for documentation. See <https://bugzilla.redhat.com/show_bug.cgi?id=597597> for further details.
8b51490
8b51490
* Thu Jun 17 2010 Lars Bjørndal <lars.bjorndal@broadpark.no> 1.8.0-2
8b51490
- Created the tools sub package and did a lot of clean ups, see <https://bugzilla.redhat.com/show_bug.cgi?id=597597>.
8b51490
8b51490
* Sat May 29 2010 Lars Bjørndal <lars.bjorndal@broadpark.no> 1.8.0-1
8b51490
- Create the RPM for Fedora.