Tue, 31 Jul 2012 09:38:55 +0200
Import package vendor original specs for necessary manipulations.
michael@423 | 1 | ## |
michael@423 | 2 | ## top.spec -- OpenPKG RPM Package Specification |
michael@423 | 3 | ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@423 | 4 | ## |
michael@423 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@423 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@423 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@423 | 8 | ## copies. |
michael@423 | 9 | ## |
michael@423 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@423 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@423 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@423 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@423 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@423 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@423 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@423 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@423 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@423 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@423 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@423 | 21 | ## SUCH DAMAGE. |
michael@423 | 22 | ## |
michael@423 | 23 | |
michael@423 | 24 | # package version |
michael@423 | 25 | %define V_dist 3.8beta1 |
michael@423 | 26 | %define V_opkg 3.8b1 |
michael@423 | 27 | |
michael@423 | 28 | # package information |
michael@423 | 29 | Name: top |
michael@423 | 30 | Summary: Full-Screen Process Display |
michael@423 | 31 | URL: http://www.unixtop.org/ |
michael@423 | 32 | Vendor: William LeFebvre |
michael@423 | 33 | Packager: OpenPKG Foundation e.V. |
michael@423 | 34 | Distribution: OpenPKG Community |
michael@423 | 35 | Class: EVAL |
michael@423 | 36 | Group: Monitoring |
michael@423 | 37 | License: Freely Redistributable |
michael@423 | 38 | Version: %{V_opkg} |
michael@423 | 39 | Release: 20090522 |
michael@423 | 40 | |
michael@423 | 41 | # list of sources |
michael@423 | 42 | Source0: http://www.unixtop.org/dist/top-%{V_dist}.tar.gz |
michael@423 | 43 | |
michael@423 | 44 | # build information |
michael@423 | 45 | Prefix: %{l_prefix} |
michael@423 | 46 | BuildRoot: %{l_buildroot} |
michael@423 | 47 | BuildPreReq: OpenPKG, openpkg >= 20040130 |
michael@423 | 48 | PreReq: OpenPKG, openpkg >= 20040130 |
michael@423 | 49 | AutoReq: no |
michael@423 | 50 | AutoReqProv: no |
michael@423 | 51 | |
michael@423 | 52 | %description |
michael@423 | 53 | Top is a full-screen display of the currently running system |
michael@423 | 54 | processes. |
michael@423 | 55 | |
michael@423 | 56 | %track |
michael@423 | 57 | prog top = { |
michael@423 | 58 | version = %{V_dist} |
michael@423 | 59 | url = http://www.unixtop.org/download/ |
michael@423 | 60 | regex = top-(__VER__)\.tar\.gz |
michael@423 | 61 | } |
michael@423 | 62 | |
michael@423 | 63 | %prep |
michael@423 | 64 | %setup -q -n top-%{V_dist} |
michael@423 | 65 | |
michael@423 | 66 | %build |
michael@423 | 67 | # configure program |
michael@423 | 68 | CC="%{l_cc}" \ |
michael@423 | 69 | CFLAGS="%{l_cflags -O}" \ |
michael@423 | 70 | ./configure \ |
michael@423 | 71 | --prefix=%{l_prefix} |
michael@423 | 72 | |
michael@423 | 73 | # build program |
michael@423 | 74 | %{l_make} %{l_mflags} |
michael@423 | 75 | |
michael@423 | 76 | %install |
michael@423 | 77 | rm -rf $RPM_BUILD_ROOT |
michael@423 | 78 | |
michael@423 | 79 | # install program |
michael@423 | 80 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@423 | 81 | $RPM_BUILD_ROOT%{l_prefix}/bin \ |
michael@423 | 82 | $RPM_BUILD_ROOT%{l_prefix}/man/man1 |
michael@423 | 83 | %{l_shtool} install -c -s -m 755 \ |
michael@423 | 84 | top $RPM_BUILD_ROOT%{l_prefix}/bin/ |
michael@423 | 85 | %{l_shtool} install -c -m 644 \ |
michael@423 | 86 | top.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ |
michael@423 | 87 | |
michael@423 | 88 | # determine installation files |
michael@423 | 89 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@423 | 90 | %{l_files_std} \ |
michael@423 | 91 | '%attr(4711,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/top' |
michael@423 | 92 | |
michael@423 | 93 | %files -f files |
michael@423 | 94 | |
michael@423 | 95 | %clean |
michael@423 | 96 | rm -rf $RPM_BUILD_ROOT |
michael@423 | 97 |