You are not logged in.

#1 2022-04-24 20:25:43

caray
Member
Registered: 2021-04-04
Posts: 25

i need help learning how to publish to the AUR

i've got a program i've been working on, and it has a makefile that i wrote, and now i want to be able to publish it to the aur, but ive never done anything like this and i have questions like, first of all, how do i even write a "make install", and secondly i read that it says to install binaries into /usr/bin but what about all the assets my program needs, where do i place those? any helps or links to tutorials would be appreciated thank you

Offline

#2 2022-04-24 20:43:35

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: i need help learning how to publish to the AUR

You need to figure out the makefile bits before you even think about anything else as those are all distro independant.

Once you have that all sorted then it should be trivial to follow the AUR guidelines and the PKGBUILD guidelines to submit your project to the AUR.

A quick web search for makefile gives dozens of decent looking tutorials. What have you come up with so far?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2022-04-24 20:57:16

caray
Member
Registered: 2021-04-04
Posts: 25

Re: i need help learning how to publish to the AUR

well i've already written my makefile, SOMEHOW, it's just in install bit i dont know about as i've never needed it. gnu make is not something i want to spend much time on because im not insane

Offline

#4 2022-04-24 20:58:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,445
Website

Re: i need help learning how to publish to the AUR

caray wrote:

i read that it says to install binaries into /usr/bin but what about all the assets my program needs

It depends on what you mean by "assests", but one likely location is /usr/share/$PROGRAM_NAME/.  Of course your makefile should not install directly to such locations, but should use DESTDIR and PREFIX variables.  Look at some examples to see how these are used.

caray wrote:

well i've already written my makefile

Then, as requested, show what you have so far.

caray wrote:

it's just in install bit i dont know about as i've never needed it.

Then you have not written a complete makefile.  In theory, you could do all the install work in the PKGBUILD, but this would be silly given that you are the author of the Makefile too.

caray wrote:

gnu make is not something i want to spend much time on because im not insane

It shouldn't take much time at all, less time that it takes to wait for replies to this thread that's for sure.  And by all means, don't learn about GNU make - but learn about POSIX make.

Note that saying you want to publish code, but you don't want to learn what you need to know to publish code because "you're not insane", really just makes you sound ... well, insane.

Last edited by Trilby (2022-04-24 21:02:11)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2022-04-24 21:06:08

caray
Member
Registered: 2021-04-04
Posts: 25

Re: i need help learning how to publish to the AUR

behold, my first and only makefile:

# make splash=1  ...if you wanna specify a specific splash scene otherwise it will use scene in index 0

build/out: src/_/main.o src/_/shader.o src/_/buffers.o src/_/coords.o src/_/matrix.o src/_/texture.o src/_/obj.o src/_/audio.o src/_/util.o
	g++ src/_/main.o src/_/shader.o src/_/buffers.o src/_/coords.o src/_/matrix.o src/_/texture.o src/_/obj.o src/_/audio.o src/_/util.o -o build/out -lSDL2 -lSDL2_mixer -lGL -lGLEW

src/_/main.o: src/main.cxx src/scene_manager.h src/preprocess.py Scenes/*/*.cxx
	python src/preprocess.py $(splash)
	g++ -c src/main.cxx -o src/_/main.o

src/_/shader.o: src/shader.cxx src/shader.h
	g++ -c src/shader.cxx -o src/_/shader.o

src/_/buffers.o: src/buffers.cxx src/buffers.h
	g++ -c src/buffers.cxx -o src/_/buffers.o

src/_/coords.o: src/coords.cxx src/coords.h
	g++ -c src/coords.cxx -o src/_/coords.o
	
src/_/matrix.o: src/matrix.cxx src/matrix.h
	g++ -c src/matrix.cxx -o src/_/matrix.o

src/_/texture.o: src/texture.cxx src/texture.h
	g++ -c src/texture.cxx -o src/_/texture.o

src/_/obj.o: src/obj.cxx src/obj.h
	g++ -c src/obj.cxx -o src/_/obj.o

src/_/audio.o: src/audio.cxx src/audio.h
	g++ -c src/audio.cxx -o src/_/audio.o

src/_/util.o: src/util.cxx src/util.h
	g++ -c src/util.cxx -o src/_/util.o
	
clean:
	rm src/_/* build/out

------
it was a revelation to learn about modular building and that make could skip recompilation of unchanged source code, because my game engine's build times were getting quite annoying. but anyways, i'd really like to get comfortable with the AUR because arch is amazing and so is the aur

Last edited by caray (2022-04-24 21:45:40)

Offline

#6 2022-04-24 21:16:35

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: i need help learning how to publish to the AUR

Please edit your last post to use [⁣code] [⁣/code] tags around all of your file contents, outputs and commands...
CoC - Pasting pictures and code


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2022-04-24 21:45:59

caray
Member
Registered: 2021-04-04
Posts: 25

Re: i need help learning how to publish to the AUR

ok done, ty for the tip

Offline

#8 2022-04-24 21:59:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,445
Website

Re: i need help learning how to publish to the AUR

Ok, you really should learn about make.  Makes automatic / implicit recipes would replace almost everything in that Makefile.  As an example, here is one of my Makefiles that builds everything with implicit rules.  Another with even more modules looks about the same.

Each module follows the same pattern: a source file and a header to produce an object file.  This is built in to make already, so there's no need to specify it.  Further, make's implicit recipes will properly pick up any environment variables like CFLAGS and LDFLAGS (which end users would set in their makepkg.conf) but your Makefile's explicit build rules would completely ignore those.

The only recipe that has something novel is for main.o as it includes that python line and depends on Scenes/*/*.cxx, but why does it depend on those Scene's files - they aren't used in the build command (do you "#include" then from the main.cxx file)?  And what does the python script do?

Is the source in an online repository somewhere yet?

Last edited by Trilby (2022-04-24 22:02:43)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2022-04-24 23:18:10

caray
Member
Registered: 2021-04-04
Posts: 25

Re: i need help learning how to publish to the AUR

the Scenes folder contains directories each representing a unique "scene" for my game engine but i needed to manage switching scenes on the fly and what to include and whats the starting scene, all at compile time so i have the python do that by editing main.cxx  ...perhaps i should rethink this strategy because yes the scenes cxx are included in main.cxx and its a major problem because ever time i edit a scene it has to recompile main.o which is significant... but this was just a quick reply from my phone until i get home thanks for reading

Offline

Board footer

Powered by FluxBB