|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
Creating port
Hi guys,
After the recent thread on ports@ I thought porting some programs I use frequently might be useful (not least because it would make installing them after a clean upgrade much easier). I started with a Game Boy emulator, following Bernd’s tutorial for the most part, and also comparing with the makefile of emulators/scummvm. In this one, the binary installs fine but the man page doesn’t. Any advice? Code:
# make fake ===> Faking installation for gambatte-0.4.1 install -c -s -o root -g bin -m 555 /usr/ports/obj/gambatte-0.4.1/gambatte_src-0 .4.1/gambatte_sdl/gambatte_sdl /usr/ports/obj/gambatte-0.4.1/fake-i386/usr/local /bin install -c -o root -g bin -m 444 /usr/ports/obj/gambatte-0.4.1/gambatte_src-0.4. 1/gambatte_sdl/man/gambatte_sdl.6 /usr/ports/obj/gambatte-0.4.1/fake-i386/usr/l ocal/man/man6 # make install # man gambatte_sdl man: no entry for gambatte_sdl in the manual. # ls /usr/local/man/man6/ # gambatte_sdl Gambatte SDL 0.4.1 Usage: gambatte_sdl [OPTION]... romfile |
|
|||
Looks like you forgot to add it to your PLIST file.
Code:
--- PLIST.orig Mon Sep 7 06:50:07 2009 +++ PLIST Mon Sep 7 06:51:06 2009 @@ -1,2 +1,3 @@ @comment $OpenBSD$ @bin bin/gambatte_sdl +@man man/man6/gambatte_sdl.6 Good luck, porting is fun eh? |
|
|||
Just took a look around your port, I have a few comments.
Hope that helps. |
|
||||
You can have make(1) automatically create or update your port's PLIST contents, so that missing a man page or other content can be avoided. See steps 4, 18, and 23 of the Porting Checklist:
www.openbsd.org/checklist.html |
|
|||
Hi guys,
One “make plist” later and the manpage is added to pkg/PLIST, but rebuilding the port still doesn’t seem to install said manpage. Am I missing something? |
|
|||
The problem here is that libgambatte and gambatte_sdl are separate projects, if you read scons(1) you'll see that the -C operand doesn't work the way that you intended.
The following seems to work.. and it's a little cleaner, but please considering posting to the list for further critiquing from qualified eyes. Code:
--- Makefile.orig Mon Sep 7 23:50:01 2009 +++ Makefile Mon Sep 7 23:48:26 2009 @@ -20,13 +20,14 @@ LIB_DEPENDS += SDL::devel/sdl WANTLIB += c m pthread stdc++ z +WRKSRC=${WRKDIST}/gambatte_sdl + do-build: - @${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKSRC}/gambatte_sdl \ - -C ${WRKSRC}/libgambatte + ${MODSCONS_BIN} -C ${WRKDIST}/libgambatte + ${MODSCONS_BIN} -C ${WRKSRC} do-install: - ${INSTALL_PROGRAM} ${WRKBUILD}/gambatte_sdl/gambatte_sdl ${PREFIX}/bin/ - ${INSTALL_MAN} ${WRKBUILD}/gambatte_sdl/man/gambatte_sdl.6 \ - ${PREFIX}/man/man6/ + ${INSTALL_PROGRAM} ${WRKSRC}/gambatte_sdl ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/man/gambatte_sdl.6 ${PREFIX}/man/man6 .include <bsd.port.mk> |
|
|||
Thanks, I really appreciate your help. I’m confused, though—after applying the patch, the manpage still doesn’t get installed. Running the command by hand works:
Code:
# make clean ===> Cleaning for gambatte-0.4.1 # pkg_delete gambatte gambatte-0.4.1: complete # make && make install ===> Configuring for gambatte-0.4.1 ===> Building for gambatte-0.4.1 /usr/local/bin/scons -C /usr/ports/obj/gambatte-0.4.1/gambatte_src-0.4.1/libgamb atte scons: Reading SConscript files ... Checking for C header file zlib.h... yes Checking for C library z... yes scons: done reading SConscript files. scons: Building targets ... <snip> scons: done building targets. ===> Verifying specs: SDL c m pthread stdc++ z ===> found SDL.8.0 c.51.0 m.5.1 pthread.11.2 stdc++.49.0 z.4.1 ===> Installing gambatte-0.4.1 from /usr/ports/packages/i386/all/ gambatte-0.4.1: complete # man gambatte_sdl man: no entry for gambatte_sdl in the manual. # which gambatte_sdl /usr/local/bin/gambatte_sdl # make show=INSTALL_MAN install -c -o root -g bin -m 444 # make show=WRKSRC /usr/ports/obj/gambatte-0.4.1/gambatte_src-0.4.1/gambatte_sdl # make show=PREFIX /usr/local # install -c -o root -g bin -m 444 /usr/ports/obj/gambatte-0.4.1/gambatte_src-0. 4.1/gambatte_sdl/man/gambatte_sdl.6 /usr/local/man/man6 # man gambatte_sdl man: Formatting manual page...
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems. |
|
|||
It works here, a copy of gambatte_sdl.6 is inside of the resulting package.
Code:
# make package ..... ===> Faking installation for gambatte-0.4.1 install -c -s -o root -g bin -m 555 (SNIP)/gambatte_sdl/gambatte_sdl (SNIP)/fake-i386/usr/local/bin install -c -o root -g bin -m 444 (SNIP)/man/gambatte_sdl.6 (SNIP)/fake-i386/usr/local/man/man6 ===> Building package for gambatte-0.4.1 Create /usr/ports/packages/i386/all/gambatte-0.4.1.tgz Link to /usr/ports/packages/i386/ftp/gambatte-0.4.1.tgz Link to /usr/ports/packages/i386/cdrom/gambatte-0.4.1.tgz $ tar tvzf /usr/ports/packages/i386/all/gambatte-0.4.1.tgz -r--r--r-- 1 root wheel 514 Sep 7 23:06 +CONTENTS -r--r--r-- 1 root wheel 338 Sep 7 23:06 +DESC -r-xr-xr-x 1 root bin 330652 Sep 7 23:06 bin/gambatte_sdl -r--r--r-- 1 root bin 1937 Sep 7 23:06 man/man6/gambatte_sdl.6 $ Last edited by BSDfan666; 8th September 2009 at 03:13 AM. |
|
|||
Sorry about that. I had neglected to delete the old package tarball.
Posting it to the list in a bit. Thanks again for all the advice!
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SSH on port 443 | maxrussell | General software and network | 4 | 6th April 2009 05:16 AM |
Creating 2 slices | Beastie | FreeBSD Installation and Upgrading | 7 | 23rd March 2009 12:22 AM |
Songbird port | maxrussell | FreeBSD Ports and Packages | 1 | 2nd March 2009 10:47 AM |
Command to find and replace, but not creating a new file | 18Googol2 | Programming | 4 | 22nd September 2008 10:28 PM |
Creating a flash player | jgroch | Programming | 0 | 21st August 2008 05:27 AM |