You are not logged in.

#1 2016-11-19 22:47:07

tijn
Member
Registered: 2016-11-19
Posts: 2

PKGBUILD review request: prax

Hi all,

I just made my first PKGBUILD and I was hoping someone wants to take a closer look since my goal is to get it into the AUR.

# Maintainer: Tijn Schuurmans <tijnschuurmans+prax at gmail dot com>
pkgname='prax'
pkgver='0.6.1'
pkgrel=1
pkgdesc="Rack proxy server for development"
arch=('any')
url="https://github.com/ysbaddaden/prax.cr"
license=('custom:CeCILL 2.1 License')
depends=('bash')
makedepends=('crystal' 'git')
optdepends=('dnsmasq: forward .dev domains to prax')
backup=('etc/NetworkManager/dnsmasq.d/prax')
source=("https://github.com/ysbaddaden/$pkgname.cr/archive/v$pkgver.zip")
md5sums=('6b5d1bda255e5d37b5960e737df00022')

build() {
  cd "$pkgname.cr-$pkgver"
  make
}

package() {
 cd "$pkgname.cr-$pkgver"
 make all
 install -D -m755 -t "${pkgdir}/usr/lib/${pkgname}" libexec/*
 mkdir "${pkgdir}/usr/bin/"
 cd "${pkgdir}/usr/bin/" && ln -sf "../lib/${pkgname}/prax"
 cd -
 install -D -m644 -t "${pkgdir}/usr/share/doc/${pkgname}" README.md LICENSE install/prax.desktop
 # install -D -m644 install/arch/README.md "${pkgdir}/usr/share/doc/${pkgname}/arch-linux.md"
 install -D -m644 install/dnsmasq "${pkgdir}/etc/NetworkManager/dnsmasq.d/prax"
 install -D -m644 install/dnsmasq "${pkgdir}/etc/dnsmasq.d/prax"
 install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 # install -D -m644 install/arch/prax-iptables.service "${pkgdir}/etc/systemd/system/prax-iptables.service"
 # install -D -m644 install/arch/prax.service "$pkgdir"/usr/lib/systemd/user/prax.service
}

Some lines are commented out because those files will only be introduced in a new version of Prax. (Once my pull request will be merged.)

The thing I am still struggling with is that I need to show a message to the user about enabling the systemd-services. I read something about an .install file but I couldn't find any more information on it. Do you maybe have any pointers to some documentation or maybe an example from an existing package in the AUR?

Thanks,
Tijn

Last edited by tijn (2016-11-19 23:45:11)

Offline

#2 2016-11-19 23:18:47

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: PKGBUILD review request: prax

ewaller@turing ~/devel/build/prax 1146 %ll
total 4
-rw-r--r-- 1 ewaller ewaller 1305 Nov 19 15:15 PKGBUILD
ewaller@turing ~/devel/build/prax 1147 %extra-x86_64-build 
[sudo] password for ewaller: 
Sorry, try again.
[sudo] password for ewaller: 
:: Synchronizing package databases...
 core                                         120.1 KiB   195K/s 00:01 [########################################] 100%
 extra                                       1738.2 KiB  2.39M/s 00:01 [########################################] 100%
 community                                      3.7 MiB  3.58M/s 00:01 [########################################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (1) glib2-2.50.2-1

Total Installed Size:  13.36 MiB
Net Upgrade Size:       0.02 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                         [########################################] 100%
(1/1) checking package integrity                                       [########################################] 100%
(1/1) loading package files                                            [########################################] 100%
(1/1) checking for file conflicts                                      [########################################] 100%
:: Processing package changes...
(1/1) upgrading glib2                                                  [########################################] 100%
==> Building in chroot for [extra] (x86_64)...
==> Creating clean working copy [ewaller]...done
==> Making package: prax 0.6.1-1 (Sat Nov 19 15:16:40 PST 2016)
==> Retrieving sources...
  -> Downloading v0.6.1.zip...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   123    0   123    0     0    207      0 --:--:-- --:--:-- --:--:--   207
100 61719    0 61719    0     0  43595      0 --:--:--  0:00:01 --:--:--  438k
==> Validating source files with md5sums...
    v0.6.1.zip ... Passed
==> Making package: prax 0.6.1-1 (Sat Nov 19 15:16:41 PST 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (4) libevent-2.0.22-2  perl-error-0.17024-1  crystal-0.19.4-1  git-2.10.2-1

Total Download Size:    9.99 MiB
Total Installed Size:  98.72 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 crystal-0.19.4-1-x86_64                       10.0 MiB  1813K/s 00:06 [########################################] 100%
(4/4) checking keys in keyring                                         [########################################] 100%
(4/4) checking package integrity                                       [########################################] 100%
(4/4) loading package files                                            [########################################] 100%
(4/4) checking for file conflicts                                      [########################################] 100%
:: Processing package changes...
(1/4) installing libevent                                              [########################################] 100%
Optional dependencies for libevent
    python2: to use event_rpcgen.py
(2/4) installing crystal                                               [########################################] 100%
Optional dependencies for crystal
    shards: crystal language package manager
    libyaml: For YAML support
    gmp: For BigInt support [installed]
    libxml2: For XML support
(3/4) installing perl-error                                            [########################################] 100%
(4/4) installing git                                                   [########################################] 100%
Optional dependencies for git
    tk: gitk and git gui
    perl-libwww: git svn
    perl-term-readkey: git svn
    perl-mime-tools: git send-email
    perl-net-smtp-ssl: git send-email TLS support
    perl-authen-sasl: git send-email TLS support
    python2: various helper scripts
    subversion: git svn
    cvsps2: git cvsimport
    gnome-keyring: GNOME keyring credential helper
==> Retrieving sources...
  -> Found v0.6.1.zip
==> Validating source files with md5sums...
    v0.6.1.zip ... Passed
==> Extracting sources...
  -> Extracting v0.6.1.zip with bsdtar
==> Starting build()...
mkdir -p bin
/usr/bin/crystal build /build/prax/src/prax.cr-0.6.1/src/prax.cr -o bin/prax-binary
==> Entering fakeroot environment...
==> Starting package()...
mkdir -p bin
/usr/bin/crystal build /build/prax/src/prax.cr-0.6.1/src/prax.cr -o bin/prax-binary
/build/prax/src/prax.cr-0.6.1
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issue...
==> Creating package "prax"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: prax 0.6.1-1 (Sat Nov 19 15:16:57 PST 2016)
==> Installing package prax with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) prax-0.6.1-1

Total Installed Size:  0.06 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                         [########################################] 100%
(1/1) checking package integrity                                       [########################################] 100%
(1/1) loading package files                                            [########################################] 100%
(1/1) checking for file conflicts                                      [########################################] 100%
:: Processing package changes...
(1/1) installing prax                                                  [########################################] 100%
Optional dependencies for prax
    dnsmasq: forward .dev domains to prax
resolving dependencies...
looking for conflicting packages...

Packages (7) elfutils-0.167-1  libelf-0.167-1  licenses-20140629-1  pyalpm-0.8-1  python-3.5.2-3
             python-pyelftools-0.24-1  namcap-3.2.7-1

Total Installed Size:  108.34 MiB

:: Proceed with installation? [Y/n] 
(7/7) checking keys in keyring                                         [########################################] 100%
(7/7) checking package integrity                                       [########################################] 100%
(7/7) loading package files                                            [########################################] 100%
(7/7) checking for file conflicts                                      [########################################] 100%
:: Processing package changes...
(1/7) installing python                                                [########################################] 100%
Optional dependencies for python
    python-setuptools
    python-pip
    sqlite [installed]
    mpdecimal: for decimal
    xz: for lzma [installed]
    tk: for tkinter
(2/7) installing pyalpm                                                [########################################] 100%
(3/7) installing licenses                                              [########################################] 100%
(4/7) installing libelf                                                [########################################] 100%
(5/7) installing elfutils                                              [########################################] 100%
(6/7) installing python-pyelftools                                     [########################################] 100%
(7/7) installing namcap                                                [########################################] 100%
Checking PKGBUILD
PKGBUILD (prax) W: Missing Maintainer tag
Checking prax-0.6.1-1-any.pkg.tar.xz
ewaller@turing ~/devel/build/prax 1148 %

Tried to build it in a clean chroot.  Nope.
Missing maintainer tag.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-11-19 23:44:26

tijn
Member
Registered: 2016-11-19
Posts: 2

Re: PKGBUILD review request: prax

ewaller wrote:

Missing maintainer tag.

Oh, I must have cut it off when I copy/pasted it into the forum. Sorry! I will edit my original post to add it back.

Offline

#4 2016-11-19 23:55:01

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: PKGBUILD review request: prax

Okay, it built in a clean chroot.  Good start big_smile

By the way, Welcome to the Arch Linux forums.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB