You are not logged in.

#1 2015-02-09 17:32:26

vincococka
Member
Registered: 2015-02-09
Posts: 2

Own PKGBUILDs - automatic dependency recompilation

Hi all,

any hint how to solve following?
- you have base directory for your own repo -> /repo
- you make 2 directories: /repo/LIBRARY1 and /repo/PROGRAM1 (with respective PKGBUILD files inside)
- PROGRAM1/PKGBUILD has defined runtime dependency on LIBRARY1 (for example: LeafPad depends on GTK2)

How the hell make PROGRAM1 automatically recompile if LIBRARY1 is specified as dependency and LIBRARY1 is rebuild with different build options ?
Does ArchLInux have such a tool that solves package development like FreeBSD ports ?

Regards,
  V.

Offline

#2 2015-02-09 18:11:16

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Own PKGBUILDs - automatic dependency recompilation

The Arch Build System is not intended to be a full-fledged ports system but merely a means of compiling individual packages to one's tastes. No equivalent to Portmaster or Poudriere exists for Arch for the same reason---the Arch Build System isn't intended to be a primary source of system software, just a supplement to the repositories. makepkg installs build and runtime dependencies from the repositories rather than building them from the ABS tree; if a library gets updated, the developers update the PKGBUILDs of all dependent packages and rebuild them. If you're maintaining your own PKGBUILDs then you'll need to update the "pkgver=" line of each PKGBUILD and then rebuild the packages yourself. If you want to build the libraries from source as well, you need to do the same for them.

Incidentally, think FreeBSD has its own limitation: if you maintain your own port in a directory outside /usr/ports then dependency resolution will fail when you try to build it, and any custom ports in the ports tree get overwritten when the ports tree is updated. A third-party port/package (Portshaker) is needed to handle this. I could be wrong, though, as I haven't tried writing my own ports on FreeBSD.

Offline

#3 2015-02-09 18:17:44

Awebb
Member
Registered: 2010-05-06
Posts: 6,272

Re: Own PKGBUILDs - automatic dependency recompilation

Write a small bash script, that makes and installs LIBRARY1 and then rebuilds all the packages it depends on in a for loop. I doubt it would be longer than ten lines. For example, expac might be an elegant solution to read the "Required by" and "Optional for" information of the library.

cd lib_source_folder
makepkg -si
for i in $(expac command to search for required by of a package)
	# go to src folders of the package and build
	# and install it or put it somewhere
done

Offline

#4 2015-02-09 18:25:35

vincococka
Member
Registered: 2015-02-09
Posts: 2

Re: Own PKGBUILDs - automatic dependency recompilation

Thanks for explanation and idea how to solve it.
I was thinking of same kind of script that does compilation automatically and in proper order.

Regards,
  V.

Offline

Board footer

Powered by FluxBB