lshw pet package

July 27, 2008 at 4:39 am (pet_packages)

Its like a fun when I face problem when building packages. But, `lshw` source didn’t gave that fun. anyway Its a nice command to have it in puppy.

Just a small change I made to lshw’s Makefile. I don’t want `make install` to install `lshw` into my /usr/bin directory. so here is the change.

DESTDIR?=/root/buildpets/lshw-B.02.13-i686

Then everything went fine and I got lshw-B.02.13-i686.pet package

package: lshw-B.02.13-i686.pet

Permalink Leave a Comment

tcpdump pet package

July 26, 2008 at 5:10 pm (pet_packages)

Hi there

This time I compiled tcpdump-3.8.1. For this, I used libpcap-0.8.1-i686.pet which I already compiled. Its a straight away job. Steps are given below,

1. untar source tarball.
2. ./configure –prefix=”`pwd`-i686/usr”
3. make all
4. make install

The above steps will create tcpdump-3.8.1-i686 directory. If some errors showing ‘pcap_debug’, I have the details in my previous post. I hope it can clarify. Then, I came out of tcpdump-3.8.1 directory and executed the below.

5. prepare-dir2pet tcpdump-3.8.1-i686
6. dir2pet tcpdump-3.8.1-i686

Thats it. I have tcpdump-3.8.1-i686.pet for dingo(puppylinux 4.0).

Package Name: tcpdump-3.8.1-i686.pet

Permalink Leave a Comment

libpcap pet package with shared library

July 25, 2008 at 8:56 pm (pet_packages)

Hi all,

Last feburary I learned how to create pet package. Its simple and easy to create pet package in puppy so that a dump also can create package. So, I decided to create tcpdump for puppy 4.00.

while compiling tcpdump, ‘make all’ fails with ‘pcap’ library not found error. Then I decided to compile libpcap. This time I also created libpcap.so.0.8.1 shared library. Thanks to ‘jcoder24’ for giving me valuable suggession in my previous libpcap compilation. I did some tweeks in libpcap’s Makefile.in file.

CLEANFILES = $(OBJ) libpcap.a libpcap.so.0.8.1 $(GENSRC) $(GENHDR) lex.yy.c

all: libpcap.a libpcap.so.0.8.1

libpcap.so.0.8.1: $(OBJ)
@rm -f $@
gcc -shared -WI,-soname,libpcap.so.0 -o libpcap.so.0.8.1 $(OBJ)

install:
$(INSTALL_DATA) libpcap.so.0.8.1 $(DESTDIR)$(libdir)/libpcap.so.0.8.1
ldconfig $(DESTDIR)$(libdir)

uninstall:
rm -f $(DESTDIR)$(libdir)/libpcap.so.0.8.1
ldconfig $(DESTDIR)$(libdir)

So, here are the steps I followed to successfully compile libpcap with shared library.

1. Untar source tarball.
2. Edit Makefile.in as I mentioned above.
3. ./configure –prefix=”`pwd`-i686/usr” –enable–yydebug
4. make all
5. make install

To prevent ‘pcap_debug’ symbol not found error I used –enable-yydebug option with ./configure. This option is used to enable yydebug feature. I don’t know what it is doing. Perhaps guru’s can help me to understand. –prefix=”`pwd`-i686/usr” will create another directory tree as libpcap-0.8.1-i686/usr and ‘make all’ and ‘make install’ will install files in libpcap-0.8.1-i686/usr directory.

To load libpcap.so.0.8.1 in ldconfig automatically, I created pinstall.sh script.

6. cat > pinstall.sh
ln -s /usr/lib/libpcap.so.0.8.1 /usr/lib/libpcap.so.0
ln -s /usr/lib/libpcap.so /usr/lib/libpcap.so
ldconfig
7. chmod 755 pinstall.sh

to unload libpcap.so.0.8.1 from ldconfig while uninstalling, I created puninstall.sh.

8. cat > puninstall.sh
rm /usr/lib/libpcap.so.0
rm /usr/lib/libpcap.so
ldconfig

I moved both pinstall.sh and puninstall.sh into libpcap-0.8.1-i686. I didn’t use ‘new2dir’, It’s not working properly while using –prefix option with ./configure. So I used the same –prefix option to create libpcap-0.8.1-i686 directory and wrote one small script ‘prepare-dir2pet’ to generate libpcap-0.8.1-i686.files file. we need to give package directory name(libpcap-0.8.1-i686) as first argument without trailing ‘/’ to this script.

9. cat prepare-dir2pet
find “${1}” | sed -e”s/${1}\/*//g” | grep -v ‘^$’ | tee “${1}”.files

10. dir2pet libpcap-0.8.1-i686

I hope libpcap folks will provide shared library in their future release.

libpcap-0.8.1-i686.pet

Permalink Leave a Comment