Name: malaga Version: 7.12 Release: 1 Summary: A programming language for automatic language analysis Group: Development/Languages License: GPLv2+ URL: http://home.arcor.de/bjoern-beutel/malaga/ Source0: http://home.arcor.de/bjoern-beutel/malaga/%{name}-%{version}.tgz # Fix map_file symbol conflict with samba. Upstream can be considered # inactive but as libvoikko >= 2.2 doesn't use libmalaga anymore, these kind # of problems won't probably come up. The only executables in Fedora which # link to libmalaga currently are the malaga tools. Patch0: %{name}-rename-map_file.diff # Malshow needs to be linked with -lm as Fedora's ld doesn't do implicit # linking anymore Patch1: %{name}-malshow-lm.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: patch BuildRequires: gtk2-devel BuildRequires: readline-devel Requires: lib%{name} = %{version}-%{release} %define _libdir64 %{_prefix}/lib64 %description A software package for the development and application of grammars that are used for the analysis of words and sentences of natural languages. It is a language-independent system that offers a programming language for the modelling of the language-dependent grammatical information. This language is also called Malaga. Malaga is based on the grammatical theory of the "Left Associative Grammar" (LAG), developed by Roland Hausser, professor for Computational Linguistics at University of Erlangen, Germany. The library is available as 32-bit and 64-bit. %package devel Summary: Development files for %{name} Group: Development/Languages Requires: lib%{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc_r -q64" or "gcc -maix64". %package -n lib%{name} Summary: Library files for %{name} Group: Development/Libraries %description -n lib%{name} Library files for %{name}. %prep %setup -q export PATH=/opt/freeware/bin:$PATH %patch0 -p1 %patch1 -p1 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CC="xlc_r -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-shared --disable-static \ --with-readline make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-shared --disable-static \ --with-readline make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir gzip --best ${RPM_BUILD_ROOT}%{_infodir}/*info* ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}.so* ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %post /sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || : %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %{_bindir}/* %{_mandir}/man1/* %{_datadir}/%{name} %{_infodir}/%{name}* /usr/bin/* %files -n lib%{name} %defattr(-,root,system,-) %doc 32bit/CHANGES.txt 32bit/GPL.txt 32bit/README.txt %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/*.la /usr/include/* /usr/lib/*.la %changelog * Mon Mar 14 2011 Michael Perzl - 7.12-1 - first version for AIX V5.1 and higher