You are not logged in.
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
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.
Offline
thx, i will change it.
Offline
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
thx! now it's working. i gonna contact developer to patch broken make file.
Offline
Offline
You shouldn't really use srcname as a variable, use _srcname instead.
Offline
fixed thx!
Offline