You are not logged in.
I just adopted and updated ctemplate, but there are a few issues I'd like to have someone a look at.
First, the dependencies: I noticed that Python is used to build ctemplate, so I added it to makedepends. Also, there is a gcc-libs dependency, but that package is in the base group. Is it correct to assume that everything in base is installed on all systems, like everything in base-devel should be installed when building packages from AUR? FYI, here is the original PKGBUILD (from 2.2):
pkgname=ctemplate
pkgver=2.2
pkgrel=1
pkgdesc="A library implementing a simple but powerful template language for C++"
arch=('i686' 'x86_64')
url="http://code.google.com/p/ctemplate/"
license=('BSD')
depends=('gcc-libs')
options=('!libtool')
source=(http://ctemplate.googlecode.com/files/$pkgname-$pkgver.tar.gz)
md5sums=('1de89d9073f473c1e31862c4581636f3')
build() {
cd "${srcdir}/$pkgname-$pkgver"
CXXFLAGS="$CXXFLAGS" ./configure --prefix=/usr
make
}
package() {
cd "${srcdir}/$pkgname-$pkgver"
make DESTDIR="${pkgdir}" install
#license
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}and here is the current PKGBUILD:
pkgname=ctemplate
pkgver=2.3
pkgrel=1
pkgdesc="A library implementing a simple but powerful template language for C++"
arch=('i686' 'x86_64')
url="http://code.google.com/p/ctemplate/"
license=('BSD')
makedepends=('subversion' 'python')
depends=('gcc-libs')
options=('!libtool')
source=(svn+http://$pkgname.googlecode.com/svn/tags/$pkgname-$pkgver/
2to3-changes.patch)
sha256sums=('SKIP'
'8ed2e7dbf89aa7b13606a7a23638d27ba1964d67f7fcac0feaeb56273a391467')
build() {
cd $pkgname-$pkgver
patch -p0 < "$srcdir/2to3-changes.patch"
./configure --prefix=/usr
make
}
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}Please have a closer look at it.
Second, there is a strange namcap warning:
ctemplate W: Referenced library 'libctemplate_nothreads.so.3' is an uninstalled dependency
ctemplate E: Dependency perl detected and not included (programs ['perl'] needed in scripts ['usr/bin/template-converter'])Strangely enough, libctemplate_nothreads.so.3 is available as a symlink in the package, in /usr/lib/. Can I safely ignore this warning?
Last edited by Marcel- (2014-05-08 13:13:44)
Offline
applying the patch should be done in a prepare function, check https://wiki.archlinux.org/index.php/Cr … 9_function
gcc is in base-devel and will pull in gcc-libs so you could leave it out
ctemplate W: Referenced library 'libctemplate_nothreads.so.3' is an uninstalled dependency
That is normal behaviour for namcap. it detects libctemplate_nothreads.so.3 is needed, but doesn't know any package that provides it.
If you already have ctemplate installed during build, namcap will not give this warning anymore.
ctemplate E: Dependency perl detected and not included (programs ['perl'] needed in scripts ['usr/bin/template-converter'])
depending on how important template-converter is you should add perl either to optdepends or depends.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
applying the patch should be done in a prepare function, check https://wiki.archlinux.org/index.php/Cr … 9_function
gcc is in base-devel and will pull in gcc-libs so you could leave it out
Both done.
ctemplate E: Dependency perl detected and not included (programs ['perl'] needed in scripts ['usr/bin/template-converter'])
depending on how important template-converter is you should add perl either to optdepends or depends.
But perl is in base; shouldn't it be installed on all systems?
Offline
base-devel packages do not need to be listed but you should not assume that all of the base group is installed.
Patching should be done in a separate "prepare" function when possible. I also recommend including "$srcdir" in the path when cd'ing into the source directories. This is explicit and future proof against changes in makepkg.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I also recommend including "$srcdir" in the path when cd'ing into the source directories. This is explicit and future proof against changes in makepkg.
That was not in the Wiki. But you're right it's more future proof. Now my PKGBUILD looks like:
pkgname=ctemplate
pkgver=2.3
pkgrel=1
pkgdesc="A library implementing a simple but powerful template language for C++"
arch=('i686' 'x86_64')
url="http://code.google.com/p/ctemplate/"
license=('BSD')
makedepends=('subversion' 'python')
depends=('perl')
options=('!libtool')
source=(svn+http://$pkgname.googlecode.com/svn/tags/$pkgname-$pkgver/
2to3-changes.patch)
sha256sums=('SKIP'
'8ed2e7dbf89aa7b13606a7a23638d27ba1964d67f7fcac0feaeb56273a391467')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
patch -p0 < "$srcdir/2to3-changes.patch"
}
build() {
cd "$srcdir/$pkgname-$pkgver"
./configure --prefix=/usr
make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}Any further suggestions?
Offline
gcc is in base-devel and will pull in gcc-libs so you could leave it out
If it was a makedepends, yes, leave it out. Being a runtime dep, being pulled in by base-devel means nothing.
base-devel packages do not need to be listed but you should not assume that all of the base group is installed.
Unfortunately, there's not a strong policy on this. I agree that deps in the base group should be listed, but historically some of them have not been and some of the developers feel strongly that they should be assumed to be installed.
I also recommend including "$srcdir" in the path when cd'ing into the source directories. This is explicit and future proof against changes in makepkg.
Again, there's no policy on this, but I agree with you. Starting in $srcdir is undocumented behavior, and it's never a good idea to rely on undocumented behavior. Yet many of the devs aren't doing this.
Marcel-, the only other thing I have to add is that "options=('!libtool')" is now the default and no longer needed.
Last edited by Scimmia (2014-05-08 15:25:37)
Offline
Lone_Wolf wrote:gcc is in base-devel and will pull in gcc-libs so you could leave it out
If it was a makedepends, yes, leave it out. Being a runtime dep, being pulled in by base-devel means nothing.
Good point, thought of this myself: the packages in base-devel could be removed after building. Added it back in. However, namcap didn't complain about it being a dependency which was not included.
Xyne wrote:base-devel packages do not need to be listed but you should not assume that all of the base group is installed.
Unfortunately, there's not a strong policy on this. I agree that deps in the base group should be listed, but historically some of them have not been and some of the developers feel strongly that they should be assumed to be installed.
Like bash?
Marcel-, the only other thing I have to add is that "options=('!libtool')" is now the default and no longer needed.
Ok, I'll wipe it.
Offline