# Need help with creating a package set



## spellfork (Jan 15, 2010)

Hello to anyone dropping by! 

I'm quite new to the wonderful world of FreeBSD and only came in contact with it through the FreeNAS project. Now I'm really new to everything FreeBSD and get my way around through manuals and FAQs and I would greatly appreciate if anyone would have the time to help me a bit.

ok... so here's my thing.

I've been fiddling around with FreeNAS, trying to get PS3Media Server to work as my main UPnP server. Alas, the PS3MS needs mencoder, which is parts of the ports set and has restricted dependencies. So I set about to make my own mencoder package, using a full FreeBSD install on the same hardware as the FreeNAS. This led to about one hour of install, compiling and downloading dependencies... and in the end a few error messages.

So now I'm hoping to get some help here with how to proceed. I would like to get the whole ports shebang in packages that I can install on my FreeNAS (based on FreeBSD 7.2).

...and please, hold in mind that I'm new to all this.

thanks!:f


----------



## SirDice (Jan 15, 2010)

http://forums.freebsd.org/showthread.php?t=7290


----------



## spellfork (Jan 15, 2010)

Yes I understand that my question might be misstaken for not being FreeBSD related, but what I would be grateful for is if someone could help me, give some guidance or some tips on how to, with FreeBSD, make a package set, including all dependencies, of the mencoder port.

I don't even know if this is possible, I however know that one can make a package set by typing pkg_create -rb <name of installed pkg/port>. What I would be grateful for is if someone finds this thread and has some useful info and howto regarding this.


----------



## SirDice (Jan 15, 2010)

spellfork said:
			
		

> Yes I understand that my question might be misstaken for not being FreeBSD related, but what I would be grateful for is if someone could help me, give some guidance or some tips on how to, with FreeBSD, make a package set, including all dependencies, of the mencoder port.


I can only tell you how to do it on FreeBSD. I have no idea what FreeNAS uses or if you can even use packages created for FreeBSD on FreeNAS.

Anyway, making packages is really easy, i.e. apache22:

```
mkdir /usr/ports/packages
cd /usr/ports/www/apache22
make config-recursive
make package-recursive
```

Or, if you have ports-mgmt/portmaster installed, all in one go with `# portmaster -g www/apache22`.

You can find the packages in /usr/ports/packages (most of the directory structure contains symlinks to the files in All). Just copy them over and use pkg_add(1). If you don't have a lot of space you can also redirect it by setting the *PKGDIR* variable.


----------



## spellfork (Jan 15, 2010)

Thank you a million times

I'm trying it as I write this reply. This was exactly the help I needed. :e


----------



## spellfork (Jan 15, 2010)

one more little question...

if I need to rebuild the packages set using other options, do I just type the make config-recursive command again?


----------



## SirDice (Jan 15, 2010)

spellfork said:
			
		

> if I need to rebuild the packages set using other options, do I just type the make config-recursive command again?


Once the options are set they are stored in /var/db/ports/. Any [cmd=]make install[/cmd] will use them. You can easily remove them by either deleting the files or running `# make rmconfig` in the port's directory. You can use *rmconfig-recursive* to also remove the options for the port's dependencies.


----------



## spellfork (Jan 15, 2010)

thanks again... now I will try to experiment with the package creation


----------



## spellfork (Jan 15, 2010)

Hi It's me again...

Well I thoroughly went through the config process, but now when I type make package-recursive I get the console stating "mencoder-0.99.11_4 may not be packaged" ...because of the restricted dependencies.

I was so close thanks to your help SirDice, is there really no way around this? ...I mean a way that doesn't require years of extensive FreeBSD studying.


----------

