You are not logged in.

#1 2017-05-13 17:25:31

JackArc
Member
Registered: 2017-05-13
Posts: 7

[Request] purple-battlenet

hi,

i am struggling with making a PKGBUILD file and i failed.

#Maintainer: JackArc
pkgname=purple-battlenet
pkgver=r34.f57c99dd7396
pkgrel=1
pkgdesc="A plugin to login and send whispers to Battle.net v2 users."
arch=('i686' 'x86_64')
url="https://bitbucket.org/EionRobb/purple-battlenet/"
license=('GPLv3+') 
depends=('pidgin')
makedepends=('libpurple' 'glib2' 'protobuf-c' 'mercurial')
source=('purple-battlenet::hg+https://bitbucket.org/EionRobb/purple-battlenet/')
md5sums=('SKIP')

pkgver() {
 	cd $srcdir/$pkgname
 	printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
 }

build() {
    cd $srcdir/$pkgname
    make
}


package() {
  cd "${srcdir}/${pkgname}"
  make DESTDIR="$pkgdir" install
}

i can build it with 'make' without any problems, but if i build it with 'makepkg -s' i get compile error.

==> Making package: purple-battlenet r34.f57c99dd7396-1 (Sa 13. Mai 19:16:50 CEST 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating purple-battlenet hg repo...
pulling from https://bitbucket.org/EionRobb/purple-battlenet/
searching for changes
no changes found
==> Validating source files with md5sums...
    purple-battlenet ... Skipped
==> Extracting sources...
  -> Creating working copy of  hg repo...
pulling from /media/3tb_3/Frickel/builds/purple-battlenet/purple-battlenet
searching for changes
no changes found
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
cc -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -I. -shared -o libbattlenet.so bnet/attribute.pb-c.c bnet/friends_service.pb-c.c bnet/challenge_service.pb-c.c bnet/server_pool_types.pb-c.c bnet/channel_invitation_service.pb-c.c bnet/content_handle.pb-c.c bnet/game_master_service.pb-c.c bnet/channel_invitation_types.pb-c.c bnet/game_master_types.pb-c.c bnet/channel_types.pb-c.c bnet/resource_service.pb-c.c bnet/authentication_service.pb-c.c bnet/game_utilities_types.pb-c.c bnet/invitation_types.pb-c.c bnet/chat_types.pb-c.c bnet/channel_service.pb-c.c bnet/role.pb-c.c bnet/game_utilities_service.pb-c.c bnet/friends_types.pb-c.c bnet/account_types.pb-c.c bnet/account_service.pb-c.c bnet/rpc.pb-c.c bnet/entity.pb-c.c bnet/game_factory.pb-c.c bnet/presence_service.pb-c.c bnet/presence_types.pb-c.c bnet/connection_service.pb-c.c bnet/rpc_config.pb-c.c bnet/channel_owner.pb-c.c bnet/notification_service.pb-c.c bnet/profanity.pb-c.c libbattlenet.c -Wl,-O1,--sort-common,--as-needed,-z,relro -lprotobuf-c `pkg-config purple glib-2.0 --libs --cflags`   -Ipurple2compat -g -ggdb
libbattlenet.c:2284:2: error: ‘BATTLENET_PLUGIN_VERSION’ undeclared here (not in a function)
  BATTLENET_PLUGIN_VERSION, /* version */
  ^~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:92: libbattlenet.so] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

Offline

#2 2017-05-13 17:31:58

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

Re: [Request] purple-battlenet

No idea about your build issue, but the package should be called purple-battlenet-hg as you are pulling the latest commit, not a versioned release.


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-05-13 18:46:51

JackArc
Member
Registered: 2017-05-13
Posts: 7

Re: [Request] purple-battlenet

thx, i will change it.

Offline

#4 2017-05-13 19:06:29

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: [Request] purple-battlenet

The Makefile is broken. It is adding the VERSION variable only if CFLAGS is not set before calling make. makepkg does preset this variable and everything breaks. You can do something like this in the PKGBUILD to get it working:

build() {
    cd $srcdir/$pkgname
    make "CFLAGS += -DBATTLENET_PLUGIN_VERSION='\"\$(PLUGIN_VERSION)\"'"
}

Last edited by progandy (2017-05-13 19:06:58)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2017-05-13 19:28:21

JackArc
Member
Registered: 2017-05-13
Posts: 7

Re: [Request] purple-battlenet

thx! now it's working. i gonna contact developer to patch broken make file.

Offline

#6 2017-05-13 21:08:56

JackArc
Member
Registered: 2017-05-13
Posts: 7

Re: [Request] purple-battlenet

Offline

#7 2017-05-13 22:15:34

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

Re: [Request] purple-battlenet

You shouldn't really use srcname as a variable, use _srcname instead.

https://wiki.archlinux.org/index.php/Ar … _etiquette


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

#8 2017-05-14 12:00:06

JackArc
Member
Registered: 2017-05-13
Posts: 7

Re: [Request] purple-battlenet

fixed thx!

Offline

Board footer

Powered by FluxBB