fogleman/Craft

A package for the Arch User Repository (AUR).

Aniket-Pradhan opened this issue Β· 20 comments

Hello there.

Kudos for such an amazing project.

I was wondering if you were interested in making an AUR package for it? I can help, if you want to. πŸ˜„

Since @fogleman seems to be sleeping (no offense), maybe either you or I could create the package πŸ˜„.

I am on Manjaro v18.0 (based on Arch Linux) but I have no experience in this since I am primarily a Windows person.

I don't think he is sleeping πŸ˜›

I would upload a basic skeleton on my fork, and we both can work on it.

We would need to patch the program a bit (or just create a wrapper script) so that we can execute the script from anywhere in the system. Currently, we can only execute Craft from it's base directory only.

Here, you can find the PKGBUILD and the launcher.

A few tweaks are remaining.
Mainly:

  • Running craft normally does not store in the databases, because you need sudo access for it (everything is in /opt)
  • Update dependencies. I was too lazy to update them in the PKGBUILD.

If you want to contribute, you can help here. Or, find out an issue yourself (I don't think the PKGBUILD is fully clean, yet). I will be uploading it to the AUR soon.

Wow, nice work. And I just finished my PKGBUILD, right here:

# Maintainer: Kied Llaentenn (@kiedtl)

pkgname=craft
pkgdesc="A simple Minecraft clone written in C using modern OpenGL (shaders)."
pkgver=1.0
pkgrel=1
arch=('x86_64')
url=https://github.com/fogleman/Craft
license=('MIT')
provides=('craft')
makedepends=('cmake')
source=("craft-$CARCH-v${pkgver}.tar.gz::https://github.com/fogleman/Craft/archive/v${pkgver}.tar.gz")
sha512sums=('SKIP')

build() {
    cd "Craft-${pkgver}"
    cmake .
    make
}

package() {
    cd "$srcdir/$_distdir"
    cd "Craft-${pkgver}"
    mv ./craft $pkgdir
}

I guess we can just go with yours since you obviously have more experience.

We would need to patch the program a bit (or just create a wrapper script) so that we can execute the script from anywhere in the system. Currently, we can only execute Craft from it's base directory only.

And as you can see I completely forgot about his issue.
BTW can you give me collaborator access to your repo? I'll work on the dependency issue as soon as I get a chance.

BTW something might be wrong with the pkgbuild, when I ran makepkg it errored:

# snip....
Scanning dependencies of target windows
[ 98%] Building C object deps/glfw/tests/CMakeFiles/windows.dir/windows.c.o
[100%] Linking C executable windows
[100%] Built target windows
==> Entering fakeroot environment...
==> Starting package()...
chown: cannot access '/opt/craft': No such file or directory
==> ERROR: A failure occurred in package().
    Aborting...
➜  craft-git git:(master) βœ—

BTW can you give me collaborator access to your repo? I'll work on the dependency issue as soon as I get a chance.

Done!

BTW something might be wrong with the pkgbuild, when I ran makepkg it errored:

Lemme check.

And, fixed the issue. :)

Quick question: I was wondering if the dependencies mentioned in the README are makedepends or depends.

FYI I was able to build the package successfully,

FYI I was able to build the package successfully,

Cool!

The mentioned dependencies should be in depends. The only makedepends I can think of is make and cmake.

The only makedepends I can think of is make and cmake.

I don't think make should be explicitly added; according to the Arch wiki, those of the group base-devel can be implicitly used without being listed as a dependency.

OK, I think most of the issues are resolved, can we upload it to the AUR now?

I don't think make should be explicitly added; according to the Arch wiki, those of the group base-devel can be implicitly used without being listed as a dependency.

Correct!! I was looking for make in the base group... πŸ˜›

Yes! I will be pushing it to the AUR. I'll add you as a co-maintainer! πŸ˜„

Yes! I will be pushing it to the AUR. I'll add you as a co-maintainer! πŸ˜„

Thanks! πŸ˜€

What will you be adding it as? I mean the name of the package?

Name > craft-git
Because we are building directly from the git repository.

I also need your AUR username...

my AUR username is kiedtl.

Haha, yes we can.

Added! πŸŽ‰

I will close this issue. If there's anything, you can always ping me (via mail). ^>^