You are not logged in.

#1 2015-05-28 22:22:14

tr071
Member
Registered: 2014-02-12
Posts: 4

Adhoc way of using pacman to wrap "make install"?

Hi,

I have some small projects in development which installs in the "make install" way. But I wish pacman can manage the all the files, so I can use "pacman -Ql" or "pacman -R" later. I don't need any dependency tracking. I know I can create a PKGBUILD, but this seems overkill for such simple usage. I also need to update the source code as well as the configure option on local disk frequently, and I need incremental compilation. So it is clumsy to fit in the makepkg's download->script compile->package->install model.

Is there any adhoc way to "make DESTDIR=./pkg install", then ask pacman to process the whole thing and output a installable package?

Thanks

Offline

#2 2015-05-28 22:27:27

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

Re: Adhoc way of using pacman to wrap "make install"?

Er ... have you ever actually made a PKGBUILD?  If make install works, it should take all of 1 minute to make a functional PKGBUILD.  And there is no need to "download->compile->package->install", just use `makepkg -efi` in the same working directory, and it will use the updated files to rebuild/install.


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

Offline

#3 2015-05-28 22:29:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Adhoc way of using pacman to wrap "make install"?

Moving to Creating and Modifying packages...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2015-05-28 22:52:29

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: Adhoc way of using pacman to wrap "make install"?

tr071 wrote:

So it is clumsy to fit in the makepkg's download->script compile->package->install model.

You've never tried making an rpm package have you? wink

tr071 wrote:

Is there any adhoc way to "make DESTDIR=./pkg install", then ask pacman to process the whole thing and output a installable package?

No.

Offline

#5 2015-05-28 22:56:21

tr071
Member
Registered: 2014-02-12
Posts: 4

Re: Adhoc way of using pacman to wrap "make install"?

Thanks for the hints. I just noticed there is a "makepkg --repackage"  that do the job.

Offline

#6 2015-05-28 23:26:18

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Adhoc way of using pacman to wrap "make install"?

Take a look at porg/paco in AUR/ It's a package organizer (no dependancy resolving) made by a user of LFS. With it you can issue

porg -<some flag I don't remember> "make install"

This will run make install while porg tracks all newly reated files. Porg then stores the summary of newly created files (somewhere) in /var. Porg can be used for uninstalling.


Note:

Be careful. Pacman doesn't know about Porg tracked files (and vice versa), so there could be file conflicts. Porg doesn't check if file is owned by another package (it has no such a concept) so it will let "make install" overwrite anything, pacman is the one that could complain about conflicts.

Offline

#7 2015-05-28 23:27:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Adhoc way of using pacman to wrap "make install"?

tr071 wrote:

Thanks for the hints. I just noticed there is a "makepkg --repackage"  that do the job.

Did you try it out? Did it work w/o a PKGBUILD?

Offline

#8 2015-05-28 23:45:27

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

Re: Adhoc way of using pacman to wrap "make install"?

tr071 wrote:

I also need to update the source code as well as the configure option on local disk frequently

Then the repackage option will not work.  Just rebuild with the "-e" flag and only modified files will be recompiled just like using make (install).


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

Offline

#9 2015-05-29 00:00:11

tr071
Member
Registered: 2014-02-12
Posts: 4

Re: Adhoc way of using pacman to wrap "make install"?

karol wrote:
tr071 wrote:

Thanks for the hints. I just noticed there is a "makepkg --repackage"  that do the job.

Did you try it out? Did it work w/o a PKGBUILD?

Yes, it works. I just need "mkdir pkg" and copy the PKGBUILD.proto into my project, change the first 3 lines, and change

package() {
#       cd "$pkgname-$pkgver"
        make DESTDIR="$pkgdir/" install
}

Now running "makepkg --repackage" will package my already-compiled stuff into a installable.

Trilby wrote:
tr071 wrote:

I also need to update the source code as well as the configure option on local disk frequently

Then the repackage option will not work.  Just rebuild with the "-e" flag and only modified files will be recompiled just like using make (install).

I don't need makepkg to run "make" for me, as I need use some manual compiling, linking tweaks.

Offline

#10 2015-05-29 00:09:22

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

Re: Adhoc way of using pacman to wrap "make install"?

Anything you need to run to build whatever it is you're building can be put in the PKGBUILD, that's the point.


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

Offline

#11 2015-05-31 23:29:11

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: Adhoc way of using pacman to wrap "make install"?

tr071 wrote:

...I need use some manual compiling, linking tweaks.

That's what PKGBUILD's are for... So you only have to write the commands to handle those changes once instead of having to manually do them.

Offline

Board footer

Powered by FluxBB