You are not logged in.

#1 2017-08-09 13:41:57

Navet56
Member
Registered: 2017-08-09
Posts: 5

[Solved] I create a PKGBUILD package but it crashes to compilation

I start programming and I want to create my own package PKGBUILD for a game so I contribute and that has not yet a package for arch

Can anyone look at the PKGBUILD file and tell me why it crashes?

The file :

# Contributor: Navet56 <evandib@gmail.com> 
# Maintainer: Navet56 <evandib@gmail.com> 

pkgname=opmon
pkgver=0.12.1
pkgrel=1 
license=('GPL') 
arch=('x86_64') 
pkgdesc="A open source RPG monster fighting game" 
url="http://opmon-game.ga" 
depends=('sfml' 'gcc' 'libstdc++5' 'smpeg') 
makedepends=('make') 
source=(https://github.com/jlppc/OpMon/raw/master/opmon-arch.tar.gz) 
md5sums=('dc4b7a9ee207633ab03c57c5287ba517') 

build() { 
cd $srcdir/opmon-arch

make || return 1 
 
mkdir -p $pkgdir/usr/bin/
mkdir -p $pkgdir/usr/share/OpMon/

cp exeLinux/OpMon $pkgdir/usr/bin/
chmod +x $pkgdir/usr/bin
cp arch_install/bin/usr/share/OpMon $pkgdir/usr/share/OpMon
cp arch_install/bin/usr/share/applications $pkgdir/usr/share/applications
}

package() 
{
  cd "$srcdir/opmon-arch"
  make DESTIDIR="$pkgdir" install	
}

Last edited by Navet56 (2017-08-19 15:14:37)

Offline

#2 2017-08-09 14:10:40

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] I create a PKGBUILD package but it crashes to compilation

Please put [⁣code] [⁣/code] tags around the PKGBUILD when posting, it makes it far easier to read.

  • make and gcc are part of the base-devel group so can be removed from the dependencies.

  • If your packaging version 0.12.1 then you should be downloading that in your source array instead of pulling from git master.

  • Upstream states that the license is GPLv3, you should specify this. Also the music is provided under a different license, if you are installing it then this license needs to be provided as well.

  • Only the first 2 lines in your build function belong there, the rest belongs in the package function.

  • All of the mkdir/cp/chmod commands can be replaced with a couple of install commands.

  • You should quote all of your variables.

And finally something seems off about the whole packaging procedure, with a properly configured makefile all of the cp commands should be taken care of for you, I'm not sure if this is just poor coding from the developers or whether you are understanding the build process correctly.

Last edited by Slithery (2017-08-09 14:14:01)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-08-09 14:17:41

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,553

Re: [Solved] I create a PKGBUILD package but it crashes to compilation

Navet56 wrote:

Can anyone look at the PKGBUILD file and tell me why it crashes?

Not without logs. Don't expect other people to try to build it, tell us what's happening.

Offline

#4 2017-08-09 14:20:16

Navet56
Member
Registered: 2017-08-09
Posts: 5

Re: [Solved] I create a PKGBUILD package but it crashes to compilation

Thank you for your answer,
What are the install commands you are talking about ?

Offline

#5 2017-08-09 14:34:26

Navet56
Member
Registered: 2017-08-09
Posts: 5

Re: [Solved] I create a PKGBUILD package but it crashes to compilation

makepkg :

/home/evan/Desktop/src/opmon-arch/src/jlppc/regimys/start/StringKeys.cpp:53: undefined reference to `sf::String::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const'
collect2: error: ld returned 1 exit status
make: *** [Makefile:68: out_debug] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

Last edited by Navet56 (2017-08-09 14:35:13)

Offline

#6 2017-08-09 14:41:36

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,553

Re: [Solved] I create a PKGBUILD package but it crashes to compilation

That's a coding problem, not a PKGBUILD problem.

Offline

#7 2017-08-09 14:44:58

Navet56
Member
Registered: 2017-08-09
Posts: 5

Re: [Solved] I create a PKGBUILD package but it crashes to compilation

Ow, ok , I will talk about the problem to the game's programmer
Thank you

Offline

#8 2017-08-09 15:25:55

Navet56
Member
Registered: 2017-08-09
Posts: 5

Re: [Solved] I create a PKGBUILD package but it crashes to compilation

Ok, the problem according to him of the SFML library, which is in version 2.3 on Debian and 2.4 on Arch, this causes problems of compilation, the subject is resolved

Offline

#9 2017-08-09 20:37:18

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [Solved] I create a PKGBUILD package but it crashes to compilation

Edit your first post and add "[Solved]" to the title line, that way this thread is considered solved.


Matt

"It is very difficult to educate the educated."

Offline

Board footer

Powered by FluxBB