- edited description
I'd like to submit QsLog to Arch Linux's Arch User Repository and I need a little help.
Hi Razvanpetru,
Sorry for the long title. I want to help make this project easier to use under Arch Linux and submitting it to the AUR is the way to go.
However, all packages on AUR requires a version number. Unfortunately I didn't see any release of your project. (Sorry, I mean release created with a tag.) It would be excellent If you could kindly release a beta with a proper version number, e.g. 0.1.0.
Another problem is, this project is claimed to be licensed under the MIT license, but the content of LICENSE.txt looks like a BSD 3-Clause License.
Here's an example of PKGBUILD I made for you. I'm looking forward to your reply. Thank you.
Regards,
Wesley
# Maintainer: razvanpetru <razvanpetru-at-example-dot-com>
pkgname=qslog
pkgver=1.0
pkgrel=1
pkgdesc="An easy to use logger that is based on Qt's QDebug class."
arch=('i686' 'x86_64')
url="https://bitbucket.org/razvanpetru/qslog"
license=('MIT')
groups=()
depends=('qt5-base')
makedepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=(https://bitbucket.org/razvanpetru/qslog/get/49edb1da767a.zip)
noextract=()
sha256sums=('ded106c06d0e993c45af92272d47f4c07eeea3fa29d2a76f753dbb5faf725a4d')
build() {
cd razvanpetru-qslog-49edb1da767a
qmake QsLogSharedLibrary.pro
make
}
package() {
mkdir "$pkgdir/usr"
mkdir "$pkgdir/usr/include"
mkdir "$pkgdir/usr/include/qslog"
mkdir "$pkgdir/usr/lib"
cp $srcdir/razvanpetru-qslog-49edb1da767a/{QsLog.h,\
QsLogDest.h,\
QsLogDestConsole.h,\
QsLogDestFile.h,\
QsLogDestFunctor.h,\
QsLogDisableForThisFile.h,\
QsLogLevel.h} "$pkgdir/usr/include/qslog"
cp "$srcdir/razvanpetru-qslog-49edb1da767a/build-QsLogShared/libQsLog.so.2.0.0" "$pkgdir/usr/lib/"
ln -s "$pkgdir/usr/lib/libQsLog.so.2.0.0" "$pkgdir/usr/lib/libQsLog.so.2.0"
ln -s "$pkgdir/usr/lib/libQsLog.so.2.0.0" "$pkgdir/usr/lib/libQsLog.so.2"
ln -s "$pkgdir/usr/lib/libQsLog.so.2.0.0" "$pkgdir/usr/lib/libQsLog.so"
}
Comments (9)
-
reporter -
reporter - edited description
-
repo owner - changed status to open
Hi Wesley, I corrected the README.md, the license should indeed be BSD. I'll make a proper release this weekend, not including tags is indeed quite a silly oversight. :-)
I assume the PKGBUILD has to be part of the repo? In that case I can adapt it and include it, thanks for the example.
-
reporter Thank you very much for your reply!
No, the PKGBUILD file does not necessarily be part of the repo. It will be kept in the Arch Linux's git server, and updates will be committed into it.
-
reporter OK, one step further.
I didn't realize that the install process is already in the .pro file. Sorry. So the PKGBUILD file should look like this.
# Maintainer: razvanpetru <razvanpetru-at-example-dot-com> pkgname=qslog pkgver=1.0 pkgrel=1 pkgdesc="An easy to use logger that is based on Qt's QDebug class." arch=('i686' 'x86_64') url="https://bitbucket.org/razvanpetru/qslog" license=('BSD') depends=('qt5-base') source=(https://bitbucket.org/razvanpetru/qslog/get/49edb1da767a.zip) sha256sums=('5b0ec03d8057fccb1bfd2dbefe2531488aa3becd9bed6053cf1c7cbf5bae82da') build() { cd razvanpetru-qslog-49edb1da767a qmake QsLogSharedLibrary.pro make } package() { cd razvanpetru-qslog-49edb1da767a make INSTALL_ROOT="$pkgdir/" install }
Plesae ignore the sha256sums. It's supposed to be generated using
updpkgsums
.
And Arch packaging standards states that, Packages should never be installed to
/usr/local
. Yes, we seldom use that folder.
And (sorry) in 64-bit Arch Linux,
/usr/lib64
is just a symbolic link to/usr/lib
. The latest version ofpacman
(package Manager) will complain if files being installed to a symbolic link. Instead, they should be installed to where they really should be.So we may need three additional lines in
QsLogSharedLibrary.pro
.# This pro file will build QsLog as a shared library include(QsLog.pri) TARGET = QsLog VERSION = "2.0.0" QT -= gui CONFIG -= console CONFIG -= app_bundle CONFIG += shared TEMPLATE = lib QSLOG_DESTDIR=$$(QSLOG_DESTDIR) !isEmpty(QSLOG_DESTDIR) { message(Will use $${QSLOG_DESTDIR} as destdir.) DESTDIR = $${QSLOG_DESTDIR}/bin } DISTRO = $$system(uname -a) win32 { DEFINES += QSLOG_IS_SHARED_LIBRARY } unix:!macx { # make install will install the shared object in the appropriate folders headers.files = QsLog.h QsLogDest.h QsLogLevel.h headers.path = /usr/include/$(QMAKE_TARGET) other_files.files = *.txt other_files.path = /usr/local/share/$(QMAKE_TARGET) contains(DISTRO, .*ARCH): other_files.path = /usr/share/$(QMAKE_TARGET) contains(QT_ARCH, x86_64) { target.path = /usr/lib64 contains(DISTRO, .*ARCH): target.path = /usr/lib } else { target.path = /usr/lib } INSTALLS += headers target other_files }
Lines containing "DISTRO" is new to the file.
Now, if you don't mind, may I create a pull request about the file
QsLogSharedLibrary.pro
?Regards.
-
repo owner Sure, go right ahead, no need to ask for permission...
-
repo owner Hi, I've merged your pull request and added a tag "rel_2.1.0". Please let me know if there's anything else needed.
-
reporter Done. Thanks for helping.
-
reporter - changed status to resolved
- Log in to comment