You are not logged in.
I am creating a package for a system binary going into /sbin. It is easy to manually compile and install the software. Just run "make" and then "make install". There is no ./configure step. The resulting system binary is installed in /sbin.
Here is my build script (modelled after the example in the manpage for makepkg):
build() {
cd $startdir/src/$pkgname-$pkgver
make || return 1
make prefix=$startdir/pkg/usr install
mv $startdir/pkg/usr/sbin $startdir/pkg
}
Do I need to do this for system binaries going into /sbin?
Won't the last line with "mv ..." cause problems?
Can I replace the last two line with "make prefix=$startdir/pkg/sbin install"?
Rob
Offline
make prefix=$startdir/pkg/ will allow you to get rid of the last 'mv' command
Offline
makepkg is compiling the source code okay but it fails the "make prefix=.. install" step.
==> Starting build()...
cc -c -O -Wall ezusb.c -o ezusb.o
cc -c -O -Wall main.c -o main.o
cc -o fxload ezusb.o main.o
/usr/bin/install -cD fxload /var/abs/local/fxload/pkg/usr/sbin/fxload
make: /usr/bin/install: Command not found
make: *** [install] Error 127
mv: cannot stat `/var/abs/local/fxload/pkg/usr/sbin': No such file or directory
==> ERROR: Build Failed. Aborting...
The Makefile uses /usr/bin/install to install the binaries. It is not on my arch system. But I do have it on my other Linux boxes which run Slackware.
Where can I get /usr/bin/install for Arch?
Rob
P.S. I am still confused about the right syntax for the "make .. install" line in my PKBUILD.
I tried "make prefix=$startdir/pkg install" but that appears to cause more problems.
Can I just use "make prefix=$startdir/pkg/sbin install" or do I need to use two lines -- one with a mv command as in my original post?
Offline
I have /bin/install. maybe you need to edit the makefile?
Dusty
Offline
Thanks Dusty. I must have been asleep. Yes I also found install in /bin (as opposed to /usr/bin). So the easy solution is to use sed to edit the Makefile that comes with the source.
I got makepkg to work with the following build script in PKGBUILD:
build() {
cd $startdir/src/$pkgname-$pkgver
make || return 1
sed -i 's|/usr/bin/install|/bin/install|' Makefile
make prefix=$startdir/pkg/usr install
mv $startdir/pkg/usr/sbin $startdir/pkg
}
Where do I submit my new package for inclusion in the arch repositories?
Rob
Offline
aur.archlinux.org
Offline
Thanks Dusty.
I also need to apologize to Phrakture. Using "make prefix=$startdir/pkg" works. In fact it works better since I noticed that my previous build script was putting the man pages in the wrong place -- /usr/usr/man/man8/fxload... instead of /usr/man/man8/...
So here is my final build script which works fine. I even checked the resulting package with namcap.
build() {
cd $startdir/src/$pkgname-$pkgver
make || return 1
sed -i 's|/usr/bin/install|/bin/install|' Makefile
make prefix=$startdir/pkg install
}
Rob
Offline
Oh one last question when I run "namcap PKGBUILD", I get the following warnings:
PKGBUILD (fxload) W: Missing Maintainer tag
PKGBUILD (fxload) W: Missing CVS Id tag
PKGBUILD (fxload) W: Attempting to use specific sf.net mirror, use dl.sourceforge.net instead
The first warning is easy to fix. The last warning I will need to ignore since the sourcecode is not located in all the mirrors. (e.g. It is in the Phoenix mirror but not the Atlanta mirror).
But what is this message -- Missing CVS Id Tag?
Rob
Offline
You should use a Contributor tag, not a Maintainer tag. Maintainer tags are for devs and TU.
Disregard the 'Missing CVS Id tag ' message. It's for PKGBUILD in official repos.
Use the dl.sourceforge.net for the source. It will download the sources from a mirror that has them.
Offline