Search:
= Creating an OpenCSW package for zile = This wiki page details how to create an OpenCSW package on a sparc system. ==Helpful Hints== <pre> umask 22 pkg-add install cswclassutils cswpkgloghooks cswutils </pre> * Don't do this as root, you need to ensure that all files are readable my mere mortals. ==Creating the directory structure== <pre> 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 </pre> ==Getting the source== http://www.gnu.org/software/zile/ <pre> 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 - </pre> ==Compiling== <pre> cd zile-2.3.9 ./configure --prefix=/opt/csw gmake cp COPYING ~/pkg/zile/copyright </pre> ==Creating the Package== stagepkg Note the command line for createpkg spit out from the cswstage command. cd cswstage ===Modify the prototype file== At this point there are several things you need to find out. * What are the dependencies * What are you going to exclude from the package * Change the ownership of the files to root:bin Take a look at the newly create prototype file: <pre> # 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 </pre> 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. <pre> # 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 </pre> ===Create the package=== * Create the pkginfo file * Create the depend file * Run the createpkg -r command, and note the dependent packages and files * Update the depend file to include these packages * Re-run createpkg -r command <pre> 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] </pre> 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: <pre> #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 </pre> But we are not done yet, there is a file that is shared and warns us to only let CSWiconv have this file. * Remove the offending file(s) from the prototype file * Add a dependency to the depend file P CSWiconv * Re-run the createpkg -r command 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. ==References== * http://www.opencsw.org/standards/pkg-walkthrough * http://www.opencsw.org/standards/build
Summary:
This change is a minor edit.
To save this page you must answer this question:
What do you get when you remove the ARIS from Solaris?
Username: