lsof/lsof.spec

Wed, 14 Jan 2009 15:59:12 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 14 Jan 2009 15:59:12 +0100
changeset 86
78e7deb1d6ab
parent 36
88242dc55a66
child 125
06debe70afb4
permissions
-rw-r--r--

Correct and improve many buildconf and code logic blocks. In particular:
1. Document potential problems building with current binutils releases.
2. Document the flawed webkit and explain its temporary exclusion.
3. Document the edition of Qt which is built and installed.
4. Remove the Solaris x11_supdir logic as it is no longer found.
5. Correct several .pr[io] files including QMAKE_CXXFLAGS and INCPATH,
which previously caused preexisting Qt installations to deliver
erroneous old include and library logic instead of relying on
that of the currently building package. -I/opkg/include is now
placed at the end of the compile statements.
6. Don't trust the QMAKE_[INC|LIB]DIR_X11 identifiers in qmake.conf.
7. Allow more 64-bit builds and more properly identify the platform.
8. Place plugins (which are shared objects) in lib instead of share.
9. Build components as plugins when possible if with_shared is enabled.
10. Translate German text to English to be more consistent.
11. Instead of removing the pkgconfig directory of with_shared builds,
place it in a child directory useful for shared building.
12. Document the nonstandard shared build directory structure,
including using the hidden pkgconfig directory (PKG_CONFIG_PATH.)
13. Change %doc to specify files rather than directories in the RPM DB.

michael@34 1 ##
michael@34 2 ## lsof.spec -- OpenPKG RPM Package Specification
michael@34 3 ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@34 4 ##
michael@34 5 ## Permission to use, copy, modify, and distribute this software for
michael@34 6 ## any purpose with or without fee is hereby granted, provided that
michael@34 7 ## the above copyright notice and this permission notice appear in all
michael@34 8 ## copies.
michael@34 9 ##
michael@34 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@34 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@34 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@34 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@34 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@34 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@34 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@34 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@34 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@34 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@34 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@34 21 ## SUCH DAMAGE.
michael@34 22 ##
michael@34 23
michael@34 24 # package information
michael@34 25 Name: lsof
michael@34 26 Summary: List Open Files
michael@34 27 URL: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
michael@34 28 Vendor: Victor A. Abell
michael@34 29 Packager: OpenPKG Foundation e.V.
michael@34 30 Distribution: OpenPKG Community
michael@34 31 Class: BASE
michael@34 32 Group: Debugging
michael@34 33 License: BSD
michael@34 34 Version: 4.81
michael@36 35 Release: 20090106
michael@34 36
michael@34 37 # list of sources
michael@34 38 Source0: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_%{version}.tar.gz
michael@34 39 Patch0: lsof.patch
michael@34 40
michael@34 41 # build information
michael@34 42 Prefix: %{l_prefix}
michael@34 43 BuildRoot: %{l_buildroot}
michael@85 44 BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc
michael@34 45 PreReq: OpenPKG, openpkg >= 20040130
michael@34 46 AutoReq: no
michael@34 47 AutoReqProv: no
michael@34 48
michael@34 49 %description
michael@34 50 List Open Files (lsof) shows all currently open file descriptors of
michael@34 51 processes.
michael@34 52
michael@34 53 %track
michael@34 54 prog lsof = {
michael@34 55 version = %{version}
michael@34 56 url = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
michael@34 57 regex = lsof_(__VER__)\.tar\.gz
michael@34 58 }
michael@34 59
michael@34 60 %prep
michael@34 61 %setup -q -n lsof_%{version}
michael@34 62 %{l_tar} xf lsof_%{version}_src.tar
michael@34 63 cd lsof_%{version}_src
michael@34 64 %patch -p0
michael@34 65
michael@34 66 %build
michael@34 67 cd lsof_%{version}_src
michael@34 68 export PATH="/bin:/usr/bin:$PATH"
michael@34 69 export LSOF_CC="%{l_cc}"
michael@36 70 export LSOF_MAKE="%{l_make} %{l_mflags -O}"
michael@34 71 case "%{l_platform -t}" in
michael@34 72 *-freebsd* ) platform="freebsd"; LSOF_CC="/usr/bin/cc"; LSOF_MAKE="/usr/bin/make" ;;
michael@34 73 *-linux* ) platform="linux" ;;
michael@34 74 *-sunos* ) platform="solaris" ;;
michael@34 75 *-netbsd* ) platform="netbsd" ;;
michael@34 76 *-hpux* ) platform="hpuxgcc" ;;
michael@34 77 *-aix* ) platform="aixgcc" ;;
michael@34 78 * ) echo "Platform %{l_platform -t} not supported" 1>&2; exit 1 ;;
michael@34 79 esac
michael@34 80 ./Configure -n $platform
michael@34 81 eval $LSOF_MAKE
michael@34 82
michael@34 83 %install
michael@34 84 rm -rf $RPM_BUILD_ROOT
michael@34 85 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
michael@34 86 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man8
michael@34 87 ( cd lsof_%{version}_src
michael@34 88 %{l_shtool} install -c lsof $RPM_BUILD_ROOT%{l_prefix}/bin/
michael@34 89 %{l_shtool} install -c lsof.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
michael@34 90 ) || exit $?
michael@34 91 strip $RPM_BUILD_ROOT%{l_prefix}/bin/lsof >/dev/null 2>&1 || true
michael@34 92 setgid=""
michael@34 93 case "%{l_platform -t}" in
michael@34 94 *-freebsd* ) setgid="kmem" ;;
michael@34 95 *-linux* ) setgid="kmem" ;;
michael@34 96 *-sunos* ) setgid="sys" ;;
michael@34 97 *-netbsd* ) setgid="kmem" ;;
michael@34 98 *-hpux* ) setgid="sys" ;;
michael@34 99 *-aix* ) setgid="sys" ;;
michael@34 100 esac
michael@34 101 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@34 102 %{l_files_std} \
michael@34 103 "%attr(2755,%{l_musr},$setgid) %{l_prefix}/bin/lsof"
michael@34 104
michael@34 105 %files -f files
michael@34 106
michael@34 107 %clean
michael@34 108 rm -rf $RPM_BUILD_ROOT
michael@34 109

mercurial