#------------------------------------------------------------------------------
# Copyright (c) 2005-2024  The Eisfair Team, team(at)eisfair(dot)org
#
# Creation:     18.09.2005  jed
# Last Update:  $Id$
#
# !!! this is not a script but an step-by-step howto !!!
#------------------------------------------------------------------------------
exit 1

# - list of binaries:
# - /usr/sbin/portmap (ad-hoc taken from Suse system)
#
# - needs the following library packages to be build:
#
# - needs the following packages to be build:
# tcp_wrappers.7.6.tar.Z

### download
wget http://ftp.debian.org/debian/pool/main/p/portmap/portmap_6.0.0.orig.tar.gz
wget http://ftp.debian.org/debian/pool/main/p/portmap/portmap_6.0.0-2.diff.gz

### extract
gzip -d portmap_6.0.0.orig.tar.gz
tar xvf portmap_6.0.0.orig.tar

gzip -d portmap_6.0.0-2.diff.gz
mv portmap_6.0.0-2.diff portmap-6.0.0/debian/patches

cd portmap-6.0.0

### patch
# patch < portmap_6.0.0-2.diff
#   or if separate files exist
# for i in `cat debian/patches/series`; do patch --verbose -Np1 -i debian/patches/$i ; done

### environment
export CFLAGS='-O2 -march=i486'
export CXXFLAGS="${CFLAGS}"

### build
make

# strip files
strip -s pmap_dump
strip -s pmap_set
strip -s portmap

# copy files
tar cvzf ../portmap-6.0.0-e1.tgz pmap_dump pmap_dump.8 pmap_set pmap_set.8 portmap portmap.8 CHANGES README README.5 BLURBv5