pvdk wrote: I finished my first PKGBUILD. It builds OpenMW for Arch Linux: it automates the retrieval of dependencies and builds a package for pacman, Arch's package manager.
It works on my machine, but I would like for it to be tested by other Arch users before submitting it to Arch User Repository (AUR). I know there are some Arch users here so any help would be greatly appreciated!
The package builds the latest Git revision from zinnschlag's repository. A PKGBUILD for a "stable" OpenMW is currently available on AUR but is hopelessly outdated and no longer maintained. (It builds OpenMW 0.0.6!)
You can find a .tar.gz containing the PKGBUILD and .install file here:
http://www.mediafire.com/file/qdqhg6bz2 ... 104.tar.gz
For the people who would like to test this PKGBUILD but do not know how to make a package (which I can't imagine ) Look here:
https://wiki.archlinux.org/index.php/Makepkg
Currently OpenMW gets installed to /opt/openmw and the directory permissions are set to 777. I don't know if this is a good idea or not. Also, if the openmw executable is not started with /opt/openmw as PWD, Ogre will give an error whilst selecting a renderer. I guess this is because of plugins.cfg missing. It would be nice if OpenMW searched its installation directory for the configuration files instead of looking in the current working directory.
Regards,
pvdk
PS: I'm happy to report that OpenMW works with nouveau-dri/Gallium3D as gfx drivers!
Zini wrote: Great. I think we will address the path problems in 0.10.0 (work on it has already started).
Is there a default upload location for this kind of package (like Ubuntu ppa)? If yes, we could simply refer to it in the release posting. If not, we will include the package with the other packages.
btw. what you have pulled from github is the 0.9.0 release and it should be named as such.
pvdk wrote:Yeah, the AUR. You can find it here: http://aur.archlinux.org/Zini wrote:Is there a default upload location for this kind of package...
Tools like yaourt download and compile packages automagically from the AUR, really easy and saves alot of dependency downloading and configuring. Added value is the fact that you can uninstall AUR packages just like packages from the "normal" repositories.
The PKGBUILD just looks for the latest Git revision using the date specified by the pkgver variable. It happens to be the 0.9.0 release for now but I'd like to keep this package name (openmw-git) for later revisions. That way I can edit the PKGBUILD version without uploading a new package to the AUR. Just search for -git in AUR to see what I mean.
pvdk
fallenwizard wrote: I am an Arch user as well, and I have something to criticize:
These things in particular:Don't use submodule init when you are updating, don't use &&. It's better to put it on a new line.if [ -d ${_gitname} ] ; then
cd ${_gitname} && git pull origin && git submodule init && git submodule update
It's better to use git submodule update --init instead ofgit clone ${_gitroot} ${_gitname} && git submodule init && git submodule update
git submodule init && git submodule update
Don't use &&.
just usecmake ../${_gitname} \
-DCMAKE_INSTALL_PREFIX=/opt
make
cmake . -DCMAKE_INSTALL_PREFIX=/opt
make
It's less ugly and less error prone.
Everything else works fine for me.
Also you should claim the package at AUR before someone else does
pvdk wrote: Thanks fallenwizard! I didn't know you could do git submodule update and init with one command. Also, the other points you make are valid, I will edit the PKGBUILD. Happy it works for you too.
I forgot my AUR username but not my password. There's no way to retrieve your username at AUR so I have to figure something out before claiming openmw-git.
Regards.
pvdk wrote:I use this method to create CMakeFiles etc. in the folder /build. With your method build fails with "You need to run this command from the top-level directory" etc. I saw this method in other PKGBUILDS, not my own ideafallenwizard wrote:just use
cmake . -DCMAKE_INSTALL_PREFIX=/opt
make
It's less ugly and less error prone.
--Edit: New PKGBUILD:Could you please test this one fallenwizard? I removed some of the dependencies and modified the git commands.Code: Select all
# Maintainer: Pieter van der Kloet <[email protected]> pkgname=openmw-git pkgver=20110105 pkgrel=1 pkgdesc="OpenMW is a open-source engine reimplementation for the role-playing game Morrowind." arch=('i686' 'x86_64') url="http://www.openmw.com" license=('GPL3') depends=('openal' \ 'ogre' \ 'bullet' \ 'ffmpeg' \ 'mygui' \ 'mpg123' \ 'libsndfile') makedepends=('git' 'cmake') #install=${pkgname}.install # Commented out for testing conflicts=('openmw') _gitroot="git://github.com/zinnschlag/openmw.git" _gitname="openmw" build() { msg "Connecting to GIT server...." if [ -d ${_gitname} ] ; then cd ${_gitname} && git pull origin git submodule update msg "The local files are updated." else cd ${srcdir} git clone ${_gitroot} ${_gitname} git submodule update --init fi msg "GIT checkout done or server timeout" msg "Starting make..." if [ ! -d ${srcdir}/build ]; then mkdir ${srcdir}/build fi # Create Makefiles in build dir cd ${srcdir}/build cmake ../${_gitname} \ -DCMAKE_INSTALL_PREFIX=/opt make # Install sed -i 's,/usr/local/lib/OGRE,/usr/lib/OGRE,' plugins.cfg # There is currently no make install so we do this manually mkdir -p ${pkgdir}/opt/openmw cp openmw ${pkgdir}/opt/openmw cp esmtool ${pkgdir}/opt/openmw cp *.cfg ${pkgdir}/opt/openmw cp -r resources ${pkgdir}/opt/openmw chmod 0777 ${pkgdir}/opt/openmw } package() { # For makepkg package creation cd ${srcdir}/build mkdir -p ${pkgdir}/opt/openmw cp openmw ${pkgdir}/opt/openmw cp esmtool ${pkgdir}/opt/openmw cp *.cfg ${pkgdir}/opt/openmw cp -r resources ${pkgdir}/opt/openmw chmod 0777 ${pkgdir}/opt/openmw }
Hircine wrote: now you two have gotten me into ArchLinux...
will test out your script when i play around with my setup.
Guest wrote: Ah yes, I forgot about the build folder. Then your cmake solution was fine.
fallenwizard wrote: Forgot to log in :/
Ok. You did a little mistake with the git submodule update --init command.
It doesn't work because you were not inside the openmw folder. I fixed that with this:
Everything else worked perfectly.cd ${_gitname}
git submodule update --init
cd ${srcdir}
pvdk wrote:Thanks. Do you have a fresh install of Arch? If that's the case it would be ideal for testing. You can test my package by installing yaourt and typing this:Hircine wrote:will test out your script when i play around with my setup.
I've recovered my username and claimed openmw-git: it is now in AUR. You can find it here:Code: Select all
yaourt -Sy openmw-git
http://aur.archlinux.org/packages.php?ID=45102
Please vote for it there.
Happy to have another Arch user around!
Regards,
pvdk.
Hircine wrote: i tried using a virtual machine but it doesn't like me at all.
will have to do a freshy on my (old)laptop.
wish me luck lol
pvdk wrote:Forgot to refresh this page before posting, missed your message.fallenwizard wrote:Ok. You did a little mistake with the git submodule update
Is this correct now? Can't test it because I'm working on a PKGBUILD for openmw 0.08 and that one needs an older version of Ogre.
Code: Select all
else cd ${srcdir} git clone ${_gitroot} ${_gitname} cd ${_gitname} git submodule update --init cd ${srcdir} fi
ezzetabi wrote: You should put commas around variables name that might contain spaces; the curly brackets do not help in this context.
In an empty directory try:
$ A='a b c'
$ mkdir "$A"
$ ls -F
a b c/
$ rmdir a\ b\ c/
$ mkdir ${A}
$ ls -F
a/ b/ c/
$
The latter is not what you intended.
Personally I think the {} should not be used if you do not need any of their features (e.g., array indexing, string replace,...) instead if you are not desperate for space you always should use "".
pvdk wrote: Thanks ezzetabi, I was in doubt if I should use brackets or commas but you convinced me I will edit the PKGBUILD. Should I use single quotes or double?
Hircine wrote: had a go at installing Arch Linux on my Laptop and i have run into a bit of a snag. I am running it over ethernet and i can ping to google. but whenever i try to wget something it can't(say waiting for http request or whatever until i terminate the process). so i can't use pacman to update or to get new packages.
i have looked all over every forum for this problem but to can't find anything.
perhaps i should stick to ubuntu...
ap0 wrote:Look's like we've got some issues with boostCode: Select all
-- includes : /usr/include/OGRE CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1123 (message): Unable to find the requested Boost libraries. Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers. Call Stack (most recent call first): CMakeLists.txt:216 (find_package)
and with myGuiCode: Select all
-- Found Freetype: /usr/lib/libfreetype.so CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: Boost_INCLUDE_DIR (ADVANCED) used as include directory in directory /tmp/yaourt-tmp-ap0/aur-openmw-git/src/openmw used as include directory in directory /tmp/yaourt-tmp-ap0/aur-openmw-git/src/openmw/extern/caelum used as include directory in directory /tmp/yaourt-tmp-ap0/aur-openmw-git/src/openmw/extern/mygui_3.0.1 used as include directory in directory /tmp/yaourt-tmp-ap0/aur-openmw-git/src/openmw/extern/mygui_3.0.1/MyGUIEngine used as include directory in directory /tmp/yaourt-tmp-ap0/aur-openmw-git/src/openmw/extern/mygui_3.0.1/OgrePlatform used as include directory in directory /tmp/yaourt-tmp-ap0/aur-openmw-git/src/openmw/apps/openmw used as include directory in directory /tmp/yaourt-tmp-ap0/aur-openmw-git/src/openmw/apps/esmtool -- Configuring incomplete, errors occurred!
pvdk wrote: MyGUI fails because of boost not found. Could you do this and try again?:
Thanks in advance!Code: Select all
sudo pacman -Sy boost
pvdk wrote:Maybe you're suffering from the TCP window scaling issue, as ICMP (ping) works but TCP/UDP does not. Please look here:Hircine wrote:...so i can't use pacman to update or to get new packages.
https://wiki.archlinux.org/index.php/Co ... ling_issue
ap0 wrote: Compiling...
(intel atom powered, yay !)
pvdk wrote: It's compiling, that means that CMake found Boost this time. I shall add boost to the dependencies, obviously Ogre's boost-libs dependency is not enough.
fallenwizard wrote: Your PKGBUILD worked without problems now. I used community/ogre, community/mygui and extra/boost.
ap0 wrote: Iirc, Ogre use boost, didn't he ?
fallenwizard wrote:No. Only boost-libs but afaik boost-libs depends on boost.ap0 wrote:Iirc, Ogre use boost, didn't he ?
depends=('boost-libs' 'freeimage' 'freetype2' 'libxaw' 'libxrandr'
'nvidia-cg-toolkit' 'mesa' 'zziplib' 'ois')
pvdk wrote:Boost-libs does not depend on Boost, so I will change my PKGBUILD.fallenwizard wrote:No. Only boost-libs but afaik boost-libs depends on boost.
Another thing: I'm the maintainer of openmw in AUR now and I updated it to version 0.08. Thanks Andrew M. (whoever you are) for disowning the package. That package can use some testing too. (hint, hint )
fallenwizard wrote: Ok. I was wrong. Again...
On the wayThat package can use some testing too. (hint, hint )
EDIT:
package works fine
pvdk wrote: Nice!
Hircine wrote:Code: Select all
==> Starting make... -- The C compiler identification is unknown -- The CXX compiler identification is unknown -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- broken CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): The C compiler "/usr/bin/gcc" is not able to compile a simple test program. It fails with the following output: Change Dir: /var/abs/local/yaourtbuild/openmw-git/src/build/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/make "cmTryCompileExec/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build make[1]: Entering directory `/var/abs/local/yaourtbuild/openmw-git/src/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /var/abs/local/yaourtbuild/openmw-git/src/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o /usr/bin/gcc -march=i686 -mtune=generic -O2 -pipe -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c /var/abs/local/yaourtbuild/openmw-git/src/build/CMakeFiles/CMakeTmp/testCCompiler.c /usr/lib/gcc/i686-pc-linux-gnu/4.5.2/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory make[1]: Leaving directory `/var/abs/local/yaourtbuild/openmw-git/src/build/CMakeFiles/CMakeTmp' make[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o] Error 1 make: *** [cmTryCompileExec/fast] Error 2 CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:1 (project)
with a fresh install of Arch + GDM + Nvidia. and base-devel is installed.
thoughts?
it was my router would you believe that was causing the problem before. windows machine was working perfectly. graaa.
ap0 wrote: You've got a problem with gcc :/
pvdk wrote: Hmm strange, it seems your compiler is not working. Can you build other packages from aur?
Edit:
ap0 beat me to it Have a look here: should not happen on a fresh install but who knows:
https://bbs.archlinux.org/viewtopic.php?id=107372
Hmm you're also missing some libraries which are required by gcc. Somehow something got messed up. Try installing gcc manually.
fallenwizard wrote:Did you mess around with the core packages at the installer? mpfr is in core so it should install automatically. Try to install base and base-devel again:Hircine wrote:snip
pacman -S base base-devel
Hircine wrote: i selected both base/base-devel at teh installer.
it should have installed everything on the disc.
i ran that command. then re-ran the build
same result.
pvdk wrote: Well try a full system update and see what happens:Code: Select all
sudo pacman -Syu
Hircine wrote: that fixed it, got it compiled and it runs
ezzetabi wrote:It is not the whole story, but it is a good starting point that covers most cases:pvdk wrote:Thanks ezzetabi, I was in doubt if I should use brackets or commas but you convinced me I will edit the PKGBUILD. Should I use single quotes or double?
- use 'abc' (single quotes) when you DO NOT want any special meaning from the quoted characters. You should use this one in any string where you do not expect any transformation or changing. (e.g., '$A' is indeed $A even if A is a variable.)
- use "abc" (double quotes) when you need to protect the spaces, but you also need the meaning of $ for variables, `` for replacing or {} for their special meaning. (e.g., a way to put a full path in a variable is A="`readlink -e relative/path`")
- use {abc} (curly brackets) when you need one of their special meaning; see man bash. Most often you also need also the double quotes to protect spaces. (e.g., A='aa bb cc' /bin/echo "${A//a/d}" will output dd bb cc.)
pvdk wrote: Thanks for clarifying ezzetabi!