LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File salm.spec of Package salm (Project home:inescid:language)

Summary: Suffix Array and its Applications in Empirical Language Processing by Joy
Name: salm
Version: 201512180922
Release: 0
License: GPLv2
Group: Applications/Engineering
Source: %name-master.zip
Url: https://github.com/moses-smt/salm
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: unzip

%description
Suffix Array tool kit for empirical Language Manipulations.
By Joy, joy@cs.cmu.edu

%package devel
Summary: SALM development files
Group: Applications/Engineering
BuildRequires: gcc-c++
BuildRequires: unzip

%description devel
Suffix Array tool kit for empirical Language Manipulations.
By Joy, joy@cs.cmu.edu

%prep
%setup -q -n %{name}-master

%build
(cd Distribution/Linux; sed -i 's/CFLAGS_O64 = -c -O -m64 /CFLAGS_O64 = -c -O -m64 -fPIC /g' Makefile)
(cd Distribution/Linux; make allO64)
(cd Distribution/Linux; g++ -shared -o lib%{name}.so `find Objs -name \*.o64`)

%install
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/%{name}

mv Bin/Linux/*/*.O64 $RPM_BUILD_ROOT/%{_bindir}
mv Src $RPM_BUILD_ROOT/%{_includedir}/%{name}
find $RPM_BUILD_ROOT/%{_includedir}/%{name} -name \*.cpp\* -delete
mv Distribution/Linux/lib%{name}.so $RPM_BUILD_ROOT/%{_libdir}

cd $RPM_BUILD_ROOT
find ./usr/bin/ -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list
find ./usr/bin/ -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list
find ./usr/bin/ -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list

find ./%{_libdir} -type d | sed '1,1d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/devel.file.list
find ./%{_libdir} -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/devel.file.list
find ./%{_libdir} -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/devel.file.list

find ./%{_includedir} -type d | sed '1,1d;s,^\.,\%attr(0755\,root\,root) \%dir ,' >> $RPM_BUILD_DIR/devel.file.list
find ./%{_includedir} -type f | sed 's,^\.,\%attr(0644\,root\,root) ,' >> $RPM_BUILD_DIR/devel.file.list
find ./%{_includedir} -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/devel.file.list

%clean
rm -rf $RPM_BUILD_ROOT

%files -f ../file.list
%defattr(-,root,root,-)

%files devel -f ../devel.file.list
%defattr(-,root,root,-)

%changelog
* Wed Jan 13 2016 david.matos@inesc-id.pt
- devel package

* Fri Dec 18 2015 david.matos@inesc-id.pt
- new package from github