-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AUR packaging #19837
AUR packaging #19837
Changes from 4 commits
2ad1942
d3e4bb9
3571c70
a0c0a15
8e4f936
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
pkgbase = chapel-git | ||
pkgdesc = Programming language designed for productive parallel computing at scale | ||
pkgver = 1.27.0.7648.gbcc4ac3109 | ||
pkgrel = 1 | ||
url = https://chapel-lang.org/ | ||
arch = x86_64 | ||
arch = arm | ||
license = Apache | ||
makedepends = git | ||
makedepends = cmake | ||
depends = python | ||
depends = perl | ||
depends = llvm | ||
depends = clang | ||
source = git+https://github.com/chapel-lang/chapel.git | ||
sha256sums = SKIP | ||
|
||
pkgname = chapel-git |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
# Maintainer: Gabriel Brown <[email protected]> | ||
|
||
_gituser="chapel-lang" | ||
_gitname="chapel" | ||
|
||
pkgname=${_gitname}-git | ||
pkgver=1.27.0.7648.gbcc4ac3109 | ||
pkgrel=1 | ||
pkgdesc="Programming language designed for productive parallel computing at scale" | ||
url="https://chapel-lang.org/" | ||
arch=('x86_64' 'arm') | ||
license=('Apache') | ||
depends=('python' 'perl' 'llvm' 'clang') | ||
makedepends=('git' 'cmake') | ||
source=("git+https://github.com/${_gituser}/${_gitname}.git") | ||
mppf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
sha256sums=('SKIP') # source is not static | ||
|
||
pkgver() { | ||
cd "${srcdir}/${_gitname}" | ||
# get correct numerical version from internal file | ||
ver_file="compiler/main/version_num.h" | ||
major_ver=$(grep MAJOR_VERSION ${ver_file} | cut -d ' ' -f 3) | ||
minor_ver=$(grep MINOR_VERSION ${ver_file} | cut -d ' ' -f 3) | ||
update_ver=$(grep UPDATE_VERSION ${ver_file} | cut -d ' ' -f 3) | ||
ver_num="${major_ver}.${minor_ver}.${update_ver}" | ||
# keep second (correct) half of git describe result | ||
gitdescribe=$(git describe --long --tags --always) | ||
tail=$(echo ${gitdescribe} | cut -d '-' -f 2,3) # no version number | ||
# combine two pieces | ||
ver_hyphen="${ver_num}-${tail}" | ||
ver=$(echo ${ver_hyphen} | sed 's/\-/\./g') | ||
echo ${ver} | ||
# use below when git describe begins with correct version number | ||
#git describe --long --tags --always | sed 's/\-/\./g' | ||
} | ||
|
||
build() { | ||
cd "${srcdir}/${_gitname}" | ||
./configure --prefix=/usr | ||
make | ||
} | ||
|
||
check() { | ||
cd "${srcdir}/${_gitname}" | ||
export PATH="${srcdir}/${_gitname}/bin/linux64-x86_64:${PATH}" | ||
make check | ||
} | ||
|
||
package() { | ||
cd "${_gitname}" | ||
make DESTDIR="${pkgdir}" install | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
pkgbase = chapel | ||
pkgdesc = Programming language designed for productive parallel computing at scale | ||
pkgver = 1.26.0 | ||
pkgrel = 1 | ||
url = https://chapel-lang.org/ | ||
arch = x86_64 | ||
arch = arm | ||
license = Apache | ||
makedepends = git | ||
makedepends = cmake | ||
makedepends = libtool | ||
depends = python | ||
depends = perl | ||
depends = llvm | ||
depends = clang | ||
mppf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
depends = gmp | ||
source = https://github.com/chapel-lang/chapel/releases/download/1.26.0/chapel-1.26.0.tar.gz | ||
sha256sums = ba396b581f0a17f8da3f365a3f8b079b8d2e229a393fbd1756966b0019931ece | ||
|
||
pkgname = chapel |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
# Maintainer: J. Emiliano Deustua <[email protected]> | ||
# Co-maintainer: Gabriel Brown <[email protected]> | ||
|
||
pkgname=chapel | ||
pkgver=1.26.0 | ||
pkgrel=1 | ||
pkgdesc="Programming language designed for productive parallel computing at scale" | ||
url="https://chapel-lang.org/" | ||
arch=('x86_64' 'arm') | ||
license=('Apache') | ||
depends=('python' 'perl' 'llvm' 'clang' 'gmp') | ||
makedepends=('git' 'cmake' 'libtool') | ||
source=("https://github.com/chapel-lang/chapel/releases/download/${pkgver}/chapel-${pkgver}.tar.gz") | ||
sha256sums=('ba396b581f0a17f8da3f365a3f8b079b8d2e229a393fbd1756966b0019931ece') | ||
|
||
|
||
build() { | ||
cd "$srcdir/${pkgname}-${pkgver}" | ||
export CHPL_LIB_PIC=pic # remove on next release a la | ||
# https://github.com/chapel-lang/chapel/pull/19785 | ||
./configure --prefix=/usr | ||
mppf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
make | ||
} | ||
|
||
check() { | ||
cd "$srcdir/${pkgname}-${pkgver}" | ||
export PATH="$srcdir/${pkgname}-${pkgver}/bin/linux64-x86_64:$PATH" | ||
make check | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, this checks that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's my understanding as well, and I think that could be the case. It is possible for me to include a post install script, but I'm not sure how integrated it is in the build and install process, since the package will already be installed. The one example I have hear is people using this script to bring up end user license agreement and so on, but I'm sure we can get it do more. What exactly were you thinking would go in here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was just thinking it would be nice to have some scripting so that the maintainer of the Chapel AUR package can easily check that the installation is working. I.e. it could just be a script that you know how to run after installing. If we have that, we can (eventually) get some nightly testing config to check it as well. I don't know whether or not it would be reasonable to do this with an AUR post install script but I suspect you wouldn't want people just installing the package to always run it. (So then not a post-install). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree post-install is probably not the right tool here, but something like you describe would be nice. I think the typical approach for AUR packages is to do verification with |
||
} | ||
|
||
package() { | ||
cd "$srcdir/${pkgname}-${pkgver}" | ||
make DESTDIR="${pkgdir}" install | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
This folder contains manual copies of Arch User Repository (AUR) packaging (one AUR package per directory). | ||
mppf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
The official remote sources for each of these are `https://aur.archlinux.org/packages/<AUR package name>`. | ||
To clone the remote git repo hosted by AUR and containing the packaging and build files `git clone https://aur.archlinux.org/<AUR package name>.git` | ||
|
||
To test these builds: | ||
- install the `base-devel` package using (`sudo pacman -S base-devel`) since dependence on packages included in `base-devel` is not checked; this need only be done once | ||
- change directories to AUR package you would like to build (e.g. `cd chapel-git`). | ||
- build ready-to-install package from source using `makepkg --syncdeps`, which also installs any required dependencies | ||
- install the local package with `makepkg --install`, you will be prompted for the root password | ||
|
||
To bump to the next version number: | ||
- ensure you have maintainer priveleges to the AUR git repo and clone it (address given above) | ||
- (in `PKGBUILD`) update the version number and checksum (and dependencies if needed) | ||
- generate the `.SRCINFO` from `PKGBUILD` using `makepkg --printsrcinfo > .SRCINFO` | ||
ghbrown marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- `add`, `commit`, and `push` your changes | ||
|
||
For more detailed info about the purpose of the variables and functions in `PKGBUILD` see the articles on [`PKGBUILD`](https://wiki.archlinux.org/title/PKGBUILD) and [`makepkg`](https://wiki.archlinux.org/title/Makepkg) from the Arch Wiki. | ||
[This article](https://wiki.archlinux.org/title/Creating_packages) contains a more general overview of packaging for Arch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know what the stuff after the 1.27.0 here means? I copied it from something else but I have no idea what it's purpose is. I guess I'm just checking that you know more than I do about it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure exactly what you mean by "copied" it from something else?
The output of the pkgver() function automatically overwrites the pkgver line in PKGBUILD (I think the
makepkg
command probably feeds it tosed
or something behind the scenes?).As for what it means, I'm unsure on the central 4-digit part, but the very last part is
g<beginning of most recent commit hash
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I made a hacky chapel-git for my own testing I just copied the version number from the other AUR project I was basing it on. Anyway since it will be overwritten in the PKGBUILD file by running
pkgver()
, it might be nice to have a comment to that effect next to thepkgver=
line.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying. Just added that comment.