Last edit
Changed:
< P CSWiconv
to
> P CSWiconv
Added:
> createpkg -r /path/to/cswstage
Added:
> To build for intel, do it all over again. You can reuse almost everything except what is found in the build directories.
This wiki page details how to create an OpenCSW package on a sparc system.
umask 22 pkg-add install cswclassutils cswpkgloghooks cswutils
mkdir ~/pkg/ # Where the packages will be created mkdir ~/build mkdir ~/build-sparc mkdir ~/build-i386 mkdir ~/src # Good place to store tarballs and signatures
http://www.gnu.org/software/zile/
cd ~/src wget http://ftp.gnu.org/gnu/zile/zile-2.3.9.tar.gz wget http://ftp.gnu.org/gnu/zile/zile-2.3.9.tar.gz.sig cd ~/build-sparc gzip -c -d ~/src/zile-2.3.9.tar.gz | tar -xf -
cd zile-2.3.9 ./configure --prefix=/opt/csw gmake cp COPYING ~/pkg/zile/copyright
stagepkg
Note the command line for createpkg spit out from the cswstage command.
cd cswstage
At this point there are several things you need to find out.
Take a look at the newly create prototype file:
# cat prototype i pkginfo i copyright i depend d none /opt/csw/bin 0755 root bin f none /opt/csw/bin/zile 0755 root bin d none /opt/csw/lib 0755 root bin d none /opt/csw/lib/charset.alias 0644 root bin d none /opt/csw/share 0755 root bin d none /opt/csw/share/man 0755 root bin d none /opt/csw/share/man/man1 0755 root bin f none /opt/csw/share/man/man1/zile.1 0644 root bin d none /opt/csw/share/zile 0755 root bin f none /opt/csw/share/zile/dotzile.sample 0644 root bin f none /opt/csw/share/zile/FAQ 0644 root bin
There are a bunch of directories and files that do not need to be in the package. OpenCSW has created them I opted to remove them from the prototype file so the would not be included and ask the installer silly questions.
# cat prototype i pkginfo i copyright i depend f none /opt/csw/bin/zile 0755 root bin d none /opt/csw/lib/charset.alias 0644 root bin f none /opt/csw/share/man/man1/zile.1 0644 root bin d none /opt/csw/share/zile 0755 root bin f none /opt/csw/share/zile/dotzile.sample 0644 root bin f none /opt/csw/share/zile/FAQ 0644 root bin
cd ~/pkg/zile $EDITOR pkginfo PKG=CSWzile NAME=zile - GNU Zile - lightweight Emacs clone VERSION=2.3.9,REV=2009.07.08 CATEGORY=application VENDOR=http://www.gnu.org/software/zile/ packaged for OpenCSW by Douglas Denny HOTLINE=http://www.opencsw.org/bugtrack/ EMAIL=[nineohtwo@opencsw.org]
Create the depend file
touch depend
Update the depend file and run create createpkg again.
createpkg -r /path/to/cswstage
Check the directory to see your newly created package
ls -ltr
It should look something like this:
#ls -ltr total 856 -rw------- 1 root bin 260 Apr 20 10:02 pkginfo -rw------- 1 root bin 35147 Apr 20 10:06 copyright -rw-r--r-- 1 root root 11 Apr 20 10:32 depend -rw------- 1 root bin 269 Apr 20 10:48 prototype -rw-r--r-- 1 root root 281088 Apr 20 10:48 zile-2.3.9,REV=2010.04.21-SunOS5.10-sparc-CSW.pkg.gz
But we are not done yet, there is a file that is shared and warns us to only let CSWiconv have this file.
P CSWiconv
createpkg -r /path/to/cswstage
And you should have a fully functional OpenCSW package. Easy No?
To build for intel, do it all over again. You can reuse almost everything except what is found in the build directories.