You are not logged in.
Pages: 1
This is the first time I am submitting a package. So I want to make sure it is not messed up.
A game I am playing (Witcher 2 from Steam) needs the 32-bit version of libcurl-gnutls. There is no 32-bit multilib version of it in AUR. I did some minimal modification to the 32/64-bit native version in AUR:
https://aur.archlinux.org/packages/libcurl-gnutls/
The following PKGBUILD compiles, correctly generats a package, and installs. The game runs with it.
I did not touch the patches, so they are not included here.
Thanks~
(edited on May 25, 2014)
# based on Jose Riha <jose1711 gmail com> native package
# Maintainer: Larry Li <lzlarryli gmail com>
_pkgbasename=libcurl-gnutls
pkgname=lib32-$_pkgbasename
_pkgname=curl
_curlbuild=curlbuild-32.h
pkgver=7.32.0
pkgrel=1
pkgdesc="An URL retrieval utility and library"
arch=('i686' 'x86_64')
url="http://curl.haxx.se"
license=(custom)
makedepends=('gcc-multilib')
depends=('lib32-libssh2' 'lib32-gnutls')
options=('!libtool' '!strip')
source=("http://curl.haxx.se/download/$_pkgname-$pkgver.tar.gz"{,.asc}
curlbuild.h
01_runtests_gdb.patch
02_art_http_scripting.patch
03_keep_symbols_compat.patch
04_workaround_as_needed_bug.patch
06_always-disable-valgrind.patch
07_do-not-disable-debug-symbols.patch
90_gnutls.patch
99_nss.patch)
md5sums=('f77cf3cb59cf2bfe686b80338323fd40'
'SKIP'
'751bd433ede935c8fae727377625a8ae'
'7ad5ff89674f5f08b232064c515767ce'
'5cadcf82367cef12738fc3b0ef27483f'
'955b12e575215735b6bd563ee2e3af2a'
'fd110c854e055d0375798c2857bd260e'
'798ec0e687d6193f1fa537f82d2b132f'
'eb393f4dcd524916372c6bdd66c78c0b'
'85ca09852fb72376c444ac8dea0da3d2'
'2e71a1e566212e28f0a9756b3366900d')
prepare() {
cd "$_pkgname-$pkgver"
# apply debian patches
for i in ../*patch
do
patch -p1 < "$i"
done
}
build() {
cd "$_pkgname-$pkgver"
export CC="gcc -m32"
export CXX="g++ -m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
./configure \
--libdir=/usr/lib32 \
--prefix=/usr \
--mandir=/usr/share/man \
--disable-dependency-tracking \
--enable-versioned-symbols \
--disable-ldap \
--disable-ldaps \
--enable-ipv6 \
--enable-manual \
--enable-threaded-resolver \
--without-libidn \
--with-random=/dev/urandom \
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
--without-ssl \
--with-gnutls=/usr
make
}
package() {
install -Dm644 $srcdir/$_pkgname-$pkgver/lib/.libs/libcurl.so.4.3.0 $pkgdir/usr/lib32/libcurl-gnutls.so.4.3.0
ln -s libcurl-gnutls.so.4.3.0 $pkgdir/usr/lib32/libcurl-gnutls.so.4
install -D -m644 $srcdir/$_pkgname-$pkgver/docs/LICENSE-MIXING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}Last edited by lzlarryli (2014-05-25 19:45:57)
Offline
It's called a PKGBUILD. Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_Code
Offline
Thank you for pointing that out. It is fixed~ The mind is not properly working at 4am.....
Offline
I made more changes to it. Now both PKGBUILD and the resulting package pass namcap, except for a missing cumstom license dir complaint, which the original PKGBUILD also has. The code license is MIT, is this a problem?
Offline
"ln -s libcurl-gnutls.so.4.3.0 $pkgdir/usr/lib32/libcurl-gnutls.so.3"
This line is (probably) not a good idea. If the library was backwards compatible, it wouldn't have undergone a soname bump in the first place. Ergo libcurl-gnutls.so.4 != libcurl-gnutls.so.3
However, I haven't looked into what the patches do, so if you know something that I don't, feel free to ignore this post.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
@Stebalien, thanks~ I moved patching to prepare(). Also, I found that the package is actually covered by a mix of licenses. So I just used the license file supplied in the source as the license. Now namcap is completely happy.
Offline
@WorMzy, thanks as well. I just adapted the corresponding non-multilib package without looking too much into it last night. Now I had a closer look and I agree with you that that link looks strange. I removed it. The particular program I am running does not need it. My guess is that the non-multilib package had this because its maintainer needed it for the other package "algodoo" at that time.
Offline
Pages: 1