Home | News | Download | Packages | Forum | Wiki | Github

Cool Apps for New Packagers


#107

I think you can put the two files in distfiles, and then:

pre_configure() {
	chmod +x linuxq3apoint-1.32b-3.x86.run
	./linuxq3apoint-1.32b-3.x86.run --tar xf

	sed -i "s:/usr/local/games/quake3:/opt/quake3:" Makefile
}

All this in pre_configure() should work, I guess…

(oopss I forgot) You will certainly need to set:

build_wrksrc="ioq3-${_commit}" so that xbps-src can find the correct path.

For now my cpu is busy compiling something else so I can’t try it myself.
Good luck! :stuck_out_tongue:


#108

That looks like a better solution if I’m not too lazy to update the template with new commits instead of just rebuilding the package forcibly (your way is definitely better if one wants to PR it).

But for now I have another small problem. In what directory am I at the point of do_install?

=> ioquake3-20130506_1: running do_install ...
/usr/bin/install: cannot stat 'ioquake3/baseq3/*.pk3': No such file or directory
=> ERROR: ioquake3-20130506_1: failed to run do_install() at line 57.

The corresponding lines are:

>   # Install Quake 3 Patch Files
>   install -m644 ${pkgname}/baseq3/*.pk3 \
>   >   ${DESTDIR}/opt/${pkgname}/baseq3/

EDIT: My mistake, I’ve accidentally deleted one extra cd operation.
Should be working now.

EDIT2: It does work! And even with their newer(?) openGL2 renderer!
Here’s the template (you still need the files folder from the ioquake3-rpi and no, I didn’t remove the git dependency yet, probably will do that later.)

# Template file for 'ioquake3-rpi'
pkgname=ioquake3
version=20130506
revision=1
short_desc="ioquake3"
maintainer=""
license="GPL-2"
homepage="http://ioquake3.org/"
distfiles="http://ftp.gwdg.de/pub/misc/ftp.idsoftware.com/idstuff/quake3/linux/linuxq3apoint-1.32b-3.x86.run"
skip_extraction="linuxq3apoint-1.32b-3.x86.run"
checksum=c36132c5556b35e01950f1e9c646235033a5130f87ad776ba2bc7becf4f4f186

create_wrksrc=yes
hostmakedepends="pkg-config git"
makedepends="SDL2-devel"


do_configure() {
	# Fetch ioquake3 for x86
	git clone git://github.com/ioquake/ioq3.git $pkgname --depth=1

	cd ${pkgname}
	# Extract Patch Files
	cp $XBPS_SRCDISTDIR/${pkgname}-${version}/linuxq3apoint-1.32b-3.x86.run .
	chmod +x linuxq3apoint-1.32b-3.x86.run

	./linuxq3apoint-1.32b-3.x86.run --tar xf
}

do_build() {
	cd $pkgname
	sed -i "s:/usr/local/games/quake3:/opt/quake3:" Makefile
	make
}

do_install() {
	vmkdir opt/${pkgname}/baseq3
	vmkdir opt/${pkgname}/missionpack
	# Copy the executables
	install -m755 ${pkgname}/build/release-linux-x86_64/*.x86_64 \
		${DESTDIR}/opt/${pkgname}
	install -Dm755 ${pkgname}/build/release-linux-x86_64/baseq3/*.so \
		${DESTDIR}/opt/${pkgname}/baseq3/

	install -Dm755 ${pkgname}/build/release-linux-x86_64/missionpack/*.so \
		${DESTDIR}/opt/${pkgname}/missionpack/

	install -Dm755 ${pkgname}/build/release-linux-x86_64/renderer*.so \
		${DESTDIR}/opt/${pkgname}/

	# modify launcher scripts
	cp ${FILESDIR}/quake3.launcher .
	cp ${FILESDIR}/quake3ded.launcher .

	sed -i "s:IOQ3_BINARY:ioquake3.x86_64:" quake3.launcher
	sed -i "s:IOQ3_BINARY:ioq3ded.x86_64:" quake3ded.launcher
	sed -i "s:IOQ3_PATH:ioquake3:" quake3.launcher
	sed -i "s:IOQ3_PATH:ioquake3:" quake3ded.launcher

	# Install Quake 3 Patch Files
	install -m644 ${pkgname}/baseq3/*.pk3 \
		${DESTDIR}/opt/${pkgname}/baseq3/

	# Install Quake 3 Expansion Pack Patch Files
	install -m644 ${pkgname}/missionpack/*.pk3 \
		${DESTDIR}/opt/${pkgname}/missionpack/

	# Install Launcher (Client)
	vbin quake3.launcher quake3

	# Install Launcher (Server)
	vbin quake3ded.launcher quake3ded

	# Install Desktop File
	vinstall ${FILESDIR}/quake3.desktop 644 usr/share/applications

	# Install Icon File
	vinstall ${pkgname}/misc/quake3.png 644 usr/share/pixmaps
}

#109

In your template you can use pwd to print the name of the current/working directory, if you are lost. :wink:
I’m currently trying to improve your template…


#110

@eichhorn ok, I slightly modified your template (according to my previous comments), and now it looks like that:

# Template file for 'ioquake3'
pkgname=ioquake3
version=20171203
revision=1
_commit=bad8c3ba4e3c4db43144e40503a1afed8050c682
wrksrc="ioq3-${_commit}"
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="SDL2-devel"
short_desc="Free Software FPS Game Engine Based on Quake 3"
maintainer="local <root@localhost>"
license="GPL-2"
homepage="https://ioquake3.org"
distfiles="https://github.com/ioquake/ioq3/archive/${_commit}.tar.gz
	http://ftp.gwdg.de/pub/misc/ftp.idsoftware.com/idstuff/quake3/linux/linuxq3apoint-1.32b-3.x86.run"
skip_extraction="linuxq3apoint-1.32b-3.x86.run"
checksum="59fa3df8644aa066a67a363a59947072d3aae770daa88173f6dec8adc930fe48
	c36132c5556b35e01950f1e9c646235033a5130f87ad776ba2bc7becf4f4f186"

pre_configure() {
	# Extract Patch Files
	cp $XBPS_SRCDISTDIR/${pkgname}-${version}/linuxq3apoint-1.32b-3.x86.run .
	chmod +x linuxq3apoint-1.32b-3.x86.run
	./linuxq3apoint-1.32b-3.x86.run --tar xf

	sed -i "s:/usr/local/games/quake3:/opt/quake3:" Makefile
}

do_install() {
	vmkdir opt/${pkgname}/baseq3
	vmkdir opt/${pkgname}/missionpack

	# Copy the executables
	install -m755 build/release-linux-x86_64/*.x86_64 \
		${DESTDIR}/opt/${pkgname}
	install -Dm755 build/release-linux-x86_64/baseq3/*.so \
		${DESTDIR}/opt/${pkgname}/baseq3/

	install -Dm755 build/release-linux-x86_64/missionpack/*.so \
		${DESTDIR}/opt/${pkgname}/missionpack/

	install -Dm755 build/release-linux-x86_64/renderer*.so \
		${DESTDIR}/opt/${pkgname}/

	# modify launcher scripts
	cp ${FILESDIR}/quake3.launcher .
	cp ${FILESDIR}/quake3ded.launcher .

	sed -i "s:IOQ3_BINARY:ioquake3.x86_64:" quake3.launcher
	sed -i "s:IOQ3_BINARY:ioq3ded.x86_64:" quake3ded.launcher
	sed -i "s:IOQ3_PATH:ioquake3:" quake3.launcher
	sed -i "s:IOQ3_PATH:ioquake3:" quake3ded.launcher

	# Install Quake 3 Patch Files
	install -m644 baseq3/*.pk3 \
		${DESTDIR}/opt/${pkgname}/baseq3/

	# Install Quake 3 Expansion Pack Patch Files
	install -m644 missionpack/*.pk3 \
		${DESTDIR}/opt/${pkgname}/missionpack/

	# Install Launcher (Client)
	vbin quake3.launcher quake3

	# Install Launcher (Server)
	vbin quake3ded.launcher quake3ded

	# Install Desktop File
	vinstall ${FILESDIR}/quake3.desktop 644 usr/share/applications

	# Install Icon File
	vinstall misc/quake3.png 644 usr/share/pixmaps
}

=> I can build, install & run the program but, of course…

$ quake3
ioq3 1.36 linux-x86_64 Dec  5 2017
SSE instruction set enabled
----- FS_Startup -----
We are looking in the current search path:
/home/user/.q3a/baseq3
./baseq3
./baseq3/pak8.pk3 (9 files)
./baseq3/pak7.pk3 (4 files)
./baseq3/pak6.pk3 (64 files)
./baseq3/pak5.pk3 (7 files)
./baseq3/pak4.pk3 (272 files)
./baseq3/pak3.pk3 (4 files)
./baseq3/pak2.pk3 (148 files)
./baseq3/pak1.pk3 (26 files)
    
----------------------
534 files in pk3 files
"pak0.pk3" is missing. Please copy it from your legitimate Q3 CDROM. Also check that your ioq3 executable is in the correct place and that every file in the "baseq3" directory is present and readable

…I don’t own the legitimate Q3 CDROM. :black_joker:


#111

According to their website: “The Quake III: Arena game itself is not free. You must purchase the game to use the data and play Quake 3 with ioquake3. If you do not want to do that you can play another game made with ioquake3.”

These other games look interesting, too.


#112

Yeah, I think this should be added to the INSTALL file (the one that handles the post-install messages in the terminal)

Also, thanks a lot!


#113

Hey there, I’m trying to build iucode-tool and get the strangest error aboult .tar.xz not being recognized.

Where am I making a mistake?

=> iucode-tool-2.2_1: removing autodeps, please wait...
=> iucode-tool-2.2_1: building ...
=> iucode-tool-2.2_1: running do-extract hook: 00-distfiles ...
=> iucode-tool-2.2_1: extracting distfile(s), please wait...
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now
=> ERROR: iucode-tool-2.2_1: failed to run do-extract_00-distfiles() at line 69.

The template is as follows (the bare minimum):

# Template file for 'iucode-tool'
pkgname=iucode-tool
version=2.2
revision=1
only_for_archs="i686 x86_64"
build_style=gnu-configure
short_desc="Program to manipulate microcode update collections for Intel i686 and X86-64 system processor"
maintainer=""
license="GPL2"
homepage="https://gitlab.com/iucode-tool/iucode-tool/wikis/home"
distfiles="https://gitlab.com/iucode-tool/releases/blob/latest/iucode-tool_${version}.tar.xz"
checksum=653f22dc9c1d7f89aad8d05b090ba0781280df0b6faf3a4b8912fce8aa66e60d

Adding makedepends="xz" doesn’t help either.


#114

https://gitlab.com/iucode-tool/releases/blob/latest/iucode-tool_2.2.tar.xz is a html document and not a source archive.
https://gitlab.com/iucode-tool/releases/raw/latest/iucode-tool_2.2.tar.xz would be the correct link.

makedepends="xz" is wrong, it would be hostmakedepends, but xz is in the base-system and therefor already installed anyways.


#115

I created a new template based on the Arch PKGBUILD but, unfortunately, it does not build on x86_64-musl, see my build log


(Ioan) #116

does that encrypt the hole SSD or just /home ?


(rain1) #117

was so excited about shoebill but then I saw he is not able to continue working on it… that is a shame!


#118

Is there a way to specify a python package that is not present in the repos?

sc-controller now requires python-evdev to emulate the mouse. You can easily get one through pip but the repos lack the package.

Can I maybe get away with a post-installation message requiring the end user to run pip3 install evdev?

Or the only way is to package the python module for the main repos?


(maxice8's favorite salad) #119

#10533


#120

Thanks for the package!


#121

:disappointed: Despite several attempts, I haven’t been able to build this program.

I guess it needs an older compiler… :stuck_out_tongue_winking_eye:

However, I made a PR for this one.