X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-qt0-f176.google.com (mail-qt0-f176.google.com [209.85.216.176]) by lists.alpinelinux.org (Postfix) with ESMTP id EA92E5C4C95 for ; Sun, 20 Aug 2017 21:11:58 +0000 (GMT) Received: by mail-qt0-f176.google.com with SMTP id x36so6629415qtx.2 for ; Sun, 20 Aug 2017 14:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=VFC8lfzSr3lTS/+OqTWnq4PetQdWY8gmF4V19DWE8OI=; b=Zx6YKEKXmXBMHHLcpzCOWHHFm5UA7v86GLJRU3gkLC92iEddqGseap7clBazSJfpWJ +N+7ByNNlSkXQhI9LumaL43ftdPAeUyUGbYYB4hGmHoSm5Y9s4f4I6StQ19yyBLKZONh MVnmHJ6Lk9e/SO12Aq7O3W9cb4kLidCW4/rUDUb8duUISxXB+I5Q6eY12bUv1sPe+0Rf p6hujkXghRzZ1hxgG0nxllJZDUpcaEg7gQbUMRRKNKiWGEovbBL7+YwdZj5jGURMMFwz NQvhnAyP7LZI+WNPAeNjYPIpkQ3C5GxtM5Nla5jaGEPFWrv8enJ8i/lYXM/X5/CGmJ7J VvuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=VFC8lfzSr3lTS/+OqTWnq4PetQdWY8gmF4V19DWE8OI=; b=QbRteyWBhm+AxnxsIakTYetZYcXv2oXn7j7wN2c69PP0pkLsWCYcIxED/tMfALBBZX QEK2P6veKWYISz+Fe4p6M/Fi8YGbWJJFI7N2T/qTM2JgaWygneeuXuT9xDDlPcLO67xR 3QCHa9HiyWGX9ukAhOnG8iq0hJQ6C3MJL/HeELIt2fyF98qLnmEMT3OxQ71nS41819Iz jsNfx2HmX/SysI5EdepiKZ1rGXjevsen1z6uusIf+hOXp6qUAUuxd6IxYOOfuDMsr0CV LUoG1cE3UiL6aqaYs5LpFQ6qMTbPv80wj/mVeeK3Q9rYmmLVLH5IlHd/Hz4Hu7XI8esT SGLg== X-Gm-Message-State: AHYfb5gbcqsaYUcP/ttbCF4YBZcHMfrfQDRRpxQYzjDlPMbPO8fOu/F6 ODpNsvEST4X+GflRFMY= X-Received: by 10.200.46.7 with SMTP id r7mr23877300qta.42.1503263517988; Sun, 20 Aug 2017 14:11:57 -0700 (PDT) Received: from gmail.com ([67.205.145.156]) by smtp.gmail.com with ESMTPSA id a27sm7236028qtd.22.2017.08.20.14.11.55 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Aug 2017 14:11:56 -0700 (PDT) Date: Sun, 20 Aug 2017 21:11:54 +0000 From: Paul Morgan To: alpine-aports@lists.alpinelinux.org Subject: [alpine-aports] [PATCH] testing/createrepo_c: new aport Message-ID: <20170820211152.GA20563@gmail.com> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: VIM - Vi IMproved 8.0 X-Mailer: Mutt 1.8.3 X-do-not-ask: 0xf59e77c2 X-PGP-Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xF59E77C2 User-Agent: Mutt/1.8.3 (2017-05-23) This is a C implementation of createrepo and is smaller and faster than (the python-based) createrepo. The base package provides utilities to manipulate yum repositories: - createrepo_c - mergerepo_c - modifyrepo_c - sqliterepo_c Subpackages provide additional features. --- testing/createrepo_c/10-libdir.patch | 8 +++ testing/createrepo_c/20-pydoc.patch | 5 ++ testing/createrepo_c/APKBUILD | 127 +++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 testing/createrepo_c/10-libdir.patch create mode 100644 testing/createrepo_c/20-pydoc.patch create mode 100644 testing/createrepo_c/APKBUILD diff --git a/testing/createrepo_c/10-libdir.patch b/testing/createrepo_c/10-libdir.patch new file mode 100644 index 0000000000..82848b4030 --- /dev/null +++ b/testing/createrepo_c/10-libdir.patch @@ -0,0 +1,8 @@ +--- ./src/CMakeLists.txt.orig ++++ ./src/CMakeLists.txt +@@ -110,4 +110 @@ +-IF (CMAKE_SIZEOF_VOID_P MATCHES "8") +- SET (LIB_SUFFIX "64") +-ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8") +-SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") ++SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") diff --git a/testing/createrepo_c/20-pydoc.patch b/testing/createrepo_c/20-pydoc.patch new file mode 100644 index 0000000000..4b01b9bfed --- /dev/null +++ b/testing/createrepo_c/20-pydoc.patch @@ -0,0 +1,5 @@ +--- ./doc/python/CMakeLists.txt.orig ++++ ./doc/python/CMakeLists.txt +@@ -2 +2 @@ +- PYTHONPATH=${CMAKE_BINARY_DIR}/src/python sphinx-build -E -b html ++ PYTHONPATH=${CMAKE_BINARY_DIR}/src/python sphinx-build-2 -E -b html diff --git a/testing/createrepo_c/APKBUILD b/testing/createrepo_c/APKBUILD new file mode 100644 index 0000000000..35453a3524 --- /dev/null +++ b/testing/createrepo_c/APKBUILD @@ -0,0 +1,127 @@ +# Contributor: +# Maintainer: Paul Morgan +pkgname=createrepo_c + +# This is not ideal, but it allows to create package with recent commits. +# git_describe="0.10.0-48-g0cac54d" +treeish="0cac54d09b5a2140b625cabad95dc48898e25cdd" +upstream_tag=0.10.0 +commits_since=48 + +pkgver=${upstream_tag}.${commits_since} +pkgrel=0 +pkgdesc="C implementation of createrepo" +url="https://github.com/rpm-software-management/createrepo_c/" +arch="all" +license="GPL2" +makedepends=" + alpine-sdk + bash-completion + bzip2-dev + cmake + curl-dev + doxygen + expat-dev + file-dev + glib-dev + libressl-dev + libxml2-dev + musl-dev + py2-sphinx + python2-dev + rpm-dev + scanelf + sqlite-dev + xz-dev + zlib-dev + " +checkdepends=" + ${makedepends} + check + check-dev + py-nose + xz + " +install="" +subpackages=" + ${pkgname}-bash-completion:bashcomp:noarch + ${pkgname}-dev + ${pkgname}-dev-doc:devdoc:noarch + ${pkgname}-doc + ${pkgname}-libs + py2-${pkgname}:py2 + " +source=" + ${pkgname}-${treeish}.tar.gz::https://github.com/rpm-software-management/createrepo_c/archive/${treeish}.tar.gz + 10-libdir.patch + 20-pydoc.patch + " +builddir="${srcdir}/${pkgname}-${treeish}/" + +build() { + mkdir "${builddir}"/build + cd "${builddir}"/build + + # Pass cmake variables so + # end user does not need to set LD_LIBRARY_PATH. + # https://cmake.org/Wiki/CMake_RPATH_handling#Always_full_RPATH + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_SKIP_BUILD_RPATH=false \ + -DCMAKE_BUILD_WITH_INSTALL_RPATH=false \ + -DCMAKE_INSTALL_RPATH=/usr/lib \ + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=true \ + -DPYTHON_DESIRED=2 \ + || return 1 + + # Build binaries plus user docs. + make || return 1 + + # Build dev docs. + make doc || return 1 +} + +check() { + cd "${builddir}"/build + make tests || return 1 + tests/run_gtester.sh || return 1 +} + +package() { + cd "${builddir}"/build + make install/strip DESTDIR=${pkgdir} || return 1 +} + +py2() { + pkgdesc="Python2 bindings for createrepo_c" + depends="python2 ${pkgname}-libs" + + # This is architecture-specific and provides a *.so file. + mkdir -p "${subpkgdir}"/usr/lib + mv "${pkgdir}"/usr/lib/python* "${subpkgdir}"/usr/lib/ +} + +bashcomp() { + depends="" + pkgdesc="Bash completions for ${pkgname}" + install_if="${pkgname}=${pkgver}-r${pkgrel} bash-completion" + + mkdir -p "${subpkgdir}"/usr/share/ + mv "${pkgdir}"/usr/share/bash-completion "${subpkgdir}"/usr/share/ +} + +devdoc() { + pkgdesc="Developer documentation for ${pkgname}" + + mkdir -p "${subpkgdir}"/usr/share/doc/${pkgname}/c/ + cp -r "${builddir}"/build/doc/html/* "${subpkgdir}"/usr/share/doc/${pkgname}/c/ + + mkdir -p "${subpkgdir}"/usr/share/doc/${pkgname}/python/ + cp -r "${builddir}"/build/doc/python/html/* "${subpkgdir}"/usr/share/doc/${pkgname}/python/ +} + +sha512sums="e1e76d4a7c27af812d2ccf48512491377baeaa2506617ef6a6070dd04327a48b7f16e07bf8e84f8793db3fb5c8d0b79cd88cee4f013f86be2244a5750ccf08c0 createrepo_c-0cac54d09b5a2140b625cabad95dc48898e25cdd.tar.gz +df861d341d2acf5aba85d2bf0b959a7b22a29315efb0efeeada3871d7f1c4be035d27ff2408f55f3df24e6e11a8e5d7c4c88fd0ce25e4377b5452e861b40e188 10-libdir.patch +0abf001852efe1437f6a6fcf02143d5462f3c32bf7359f3ca2642a140e5ae708299c5513ae2bbcef12eb10f93fa89e153638e3c3227b9097f44bc16d43a26d21 20-pydoc.patch" -- 2.13.2 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---