You are not logged in.

#1 2008-09-08 07:12:19

Shirakawasuna
Member
Registered: 2007-03-09
Posts: 94

Getting the odf-converter (from source) PKGBUILD working.

Hi, I'm trying to get a from-source PKGBUILD for odf-converter working, but I'm running into some problems.  Here's the PKGBUILD, nastiness preserved:

# Contributor: Nick B <Shirakawasuna at gmail _dot_com>
pkgname=odf-converter
pkgver=2.0
pkgrel=1
pkgdesc="An application for converting OOXML files to Oasis formats"
arch=('i686' 'x86_64')
url="http://odf-converter.sourceforge.net/"
license=('custom')
depends=('mono')
source=(http://downloads.sourceforge.net/odf-converter/Odf-converter-src-$pkgver.zip
        archpatch-odf-converter-1.diff)

build() {

cd $startdir/src
patch -p0 <$startdir/src/archpatch-odf-converter-1.diff
cd $startdir/src/source/Common/OdfZipUtils
su nick -c make || return 1
cd ../../Common/OdfConverterLib/
su nick -c make || return 1
cd ../../Word/Converter/
su nick -c make || return 1
cd ../../Presentation/Converter/
su nick -c make || return 1
cd ../../Spreadsheet/Converter/
su nick -c make || return 1
cd $startdir/src/source/Shell/OdfConverter
su nick -c make || return 1
make DESTDIR=$startdir/pkg install || return 1

#cd $startdir/src
#patch -p0 <$startdir/src/archpatch-odf-converter-1.diff
#cd $startdir/src/source/Common/OdfZipUtils
#sudo -u USER make || return 1
#cd ../../Common/OdfConverterLib/
#make || return 1
#cd ../../Word/Converter/
#make || return 1
#cd ../../Presentation/Converter/
#make || return 1
#cd ../../Spreadsheet/Converter/
#make || return 1
#cd $startdir/src/source/Shell/OdfConverter
#make || return 1
#make DESTDIR=$startdir/pkg install || return 1

mkdir $startdir/pkg/usr/bin
ln -sf /usr/lib/ooo-2.0/program/OdfConverter $startdir/pkg/usr/bin/odf-converter

}

Here's the patch:

diff -Naur source/Shell/OdfConverter/Makefile source-new/Shell/OdfConverter/Makefile
--- source/Shell/OdfConverter/Makefile  2007-12-19 15:16:04.000000000 -0800
+++ source-new/Shell/OdfConverter/Makefile      2008-09-07 01:24:31.000000000 -0700
@@ -2,7 +2,7 @@
 include $(top_srcdir)/build/common.mk

 ifeq ($(OS),Cygwin)
-MACHINE_CONFIG_FILE=--machine-config $(shell cygpath -m $(shell pkg-config --variable=prefix mono))/etc/mono/2.0/machine.config
+MACHINE_CONFIG_FILE=--machine-config /etc/mono/2.0/machine.config
 CC=gcc -mno-cygwin
 EXEEXT=.exe
 PATHSEP=;
@@ -16,7 +16,7 @@
 ifeq ($(OS),Darwin)
 MACHINE_CONFIG_FILE=
 else
-MACHINE_CONFIG_FILE=--machine-config "`pkg-config --variable=prefix mono`/etc/mono/2.0/machine.config"
+MACHINE_CONFIG_FILE=--machine-config /etc/mono/2.0/machine.config
 endif
 EXEEXT=
 PATHSEP=:
@@ -72,7 +72,7 @@
            $(EXPORTDYNAMIC) \
            -Wl,--undefined=$(ZIPOPEN) -Wl,--undefined=$(UNZOPEN) \
            `pkg-config --libs-only-L mono` -L../../AdditionalTools/zlib123/contrib/minizip \
-           -Wl,-Bstatic -lmono -lzlibwapi -Wl,-Bdynamic  \
+           -Wl,-Bstatic -lmono -L../../../lib/zlibwapi.dll -Wl,-Bdynamic  \
            `pkg-config --libs-only-l mono | sed -e "s/\-lmono //"` \
            $(ZLIB) $(OTHERLIBS)
 endif

It's a bit ugly at the moment, as you can see.  If I use the commented-out section, I receive permissions errors as gmcs attempts to mess around w/ /root/.wapi for some reason.  If I use the shoddy workaround of becoming my user, it prompts me for my password but attains adequate permissions for touching ~/.wapi .  Does anyone know how I might get this aur-ready?

Offline

#2 2008-09-08 08:38:48

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 955

Re: Getting the odf-converter (from source) PKGBUILD working.

something like

export MONO_SHARED_DIR=$startdir/src/.wabi
  mkdir -p $MONO_SHARED_DIR

at the beginning of the build function should help.

Offline

#3 2008-09-08 12:09:52

Shirakawasuna
Member
Registered: 2007-03-09
Posts: 94

Re: Getting the odf-converter (from source) PKGBUILD working.

Yup, that fixed it smile.  Thanks!

Offline

Board footer

Powered by FluxBB