Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > b7250a71b68efc6a724aa21a320b9394 > files > 3

libcangjie-0.0.1a-3.fc18.src.rpm

Name:             libcangjie
Summary:          CangJie Input Method Library
Version:          0.0.1a
Release:          3%{?dist}
License:          LGPLv3+
URL:              https://github.com/wanleung/libcangjie
Source0:          http://wanleung.com/%{name}/%{name}-%{version}.tar.xz

# This was merged upstream, but is not in a release yet. It is so important
# for the UX that we apply it here, though.
Patch0:           0001-classicfreq-Rebuild-the-freq-data-with-the-latest-sc.patch

BuildRequires:    libdb-cxx-devel

# For the unit tests
BuildRequires:    perl(BerkeleyDB)

# Split out so it can be noarch
Requires:         %{name}-data = %{version}-%{release}

%description
CangJie Input Method Library


%package data
Summary:          Databases for %{name}
BuildArch:        noarch

%description data
Databases for %{name}.


%package devel
Summary:          Development files for %{name}
Requires:         %{name}%{_isa} = %{version}-%{release}
Requires:         libdb-cxx-devel

%description devel
Development files for %{name}.


%prep
%setup -q

%patch0 -p1


%build
%configure

# Remove rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

make %{?_smp_mflags}


%install
make install DESTDIR=%{buildroot}

find %{buildroot} -name '*.la' -exec rm -f '{}' \;


%check
make check


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%doc README.md COPYING
%{_libdir}/%{name}.so.1*

%files data
%doc tables/COPYING.tables
%{_datadir}/%{name}

%files devel
%{_bindir}/libcangjie_*
%{_includedir}/cangjie
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/cangjie.pc


%changelog
* Tue May 07 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 0.0.1a-3
- Apply upstream patch to fix the classic frequency.

* Sat Apr 20 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 0.0.1a-2
- Split out the databases to a noarch subpackage, as suggested by Michael
  during the review.

* Sat Apr 20 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 0.0.1a-1
- Initial package for Fedora.