# Installing ports in my own release



## j4ck (May 29, 2013)

Hi,

How can I install some ports to my own release, before making it?


----------



## bkouhi (May 29, 2013)

Hello @j4ck.

Have a look at this part of /usr/src/release/generate-release.sh:


```
build_compat9_port ()
{
        chroot ${CHROOTDIR} /bin/sh -c 'make -C /usr/ports/misc/compat9x BATCH=yes install clean'
}
```

So you can do for example:


```
build_xorg ()
{
        chroot ${CHROOTDIR} /bin/sh -c 'make -C /usr/ports/x11/xorg BATCH=yes install clean' || \
        { echo "*** Could not build the x11/xorg port.  Exiting."; exit 2; }
}
```

Then call this function to install the x11/xorg. If you want to customize a port, remove the BATCH=yes.


----------

