| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- ##
- ## minicom.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
- ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package version
- %define V_major 2.2
- %define V_minor rc2
- %define V_subdir 1721
- # package information
- Name: minicom
- Summary: Serial Line Terminal Program
- URL: http://alioth.debian.org/projects/minicom/
- Vendor: Jukka Lahtinen
- Packager: OpenPKG Foundation e.V.
- Distribution: OpenPKG Community
- Class: BASE
- Group: Communication
- License: BSD
- Version: %{V_major}%{V_minor}
- Release: 20061016
- # list of sources
- Source0: http://alioth.debian.org/download.php/%{V_subdir}/minicom-%{V_major}-%{V_minor}.tar.gz
- Patch0: minicom.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, lrzsz, make
- PreReq: OpenPKG, openpkg >= 20040130, lrzsz
- BuildPreReq: ncurses
- PreReq: ncurses
- AutoReq: no
- AutoReqProv: no
- %description
- Minicom is a menu driven communication program for serial line
- communications. It emulates ANSI and VT102 terminals, has a dialing
- directory and automatic ZMODEM download support.
- %track
- prog minicom = {
- version = %{V_major}-%{V_minor}
- url = http://alioth.debian.org/project/showfiles.php?group_id=30018&release_id=96
- regex = minicom-(__VER__)\.tar\.gz
- }
- prog minicom:subdir = {
- version = %{V_subdir}
- url = http://alioth.debian.org/project/showfiles.php?group_id=30018&release_id=96
- regex = /(\d+)/minicom-__VER__\.tar\.gz
- }
- %prep
- %setup -q -n minicom-%{V_major}-%{V_minor}
- %patch -p0
- %{l_shtool} subst \
- -e 's;wprintf;minicom_wprintf;g' \
- `find src -name "*.[ch]" -print`
- %build
- # determine default serial device
- device="/dev/modem"
- lockdir="/var/lock"
- case "%{l_platform -t}" in
- *-freebsd* ) device=/dev/cuaa0; lockdir=/var/spool/lock ;;
- *-linux* ) device=/dev/ttyS0; lockdir=/var/lock ;;
- *-sunos* ) device=/dev/cua/a; lockdir=/var/spool/locks ;;
- *-darwin* ) device=/dev/cu.modem; lockdir=/var/tmp ;;
- esac
- # configure sources
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- CPPFLAGS="%{l_cppflags ncurses .}" \
- LDFLAGS="%{l_ldflags}" \
- ./configure \
- --prefix=%{l_prefix} \
- --sysconfdir=%{l_prefix}/etc/minicom \
- --enable-lock-dir=$lockdir \
- --enable-dfl-port=$device \
- --enable-dfl-baud=9600 \
- --disable-nls
- # build programs
- %{l_make} %{l_mflags -O}
- %install
- rm -rf $RPM_BUILD_ROOT
- # pre-create installation area
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin \
- $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/minicom \
- $RPM_BUILD_ROOT%{l_prefix}/share/minicom
- # install programs
- %{l_make} %{l_mflags} install \
- prefix=$RPM_BUILD_ROOT%{l_prefix} \
- exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
- # add configuration files
- %{l_shtool} install -c -m 644 \
- -e 's;^ALL;#ALL;' \
- doc/minicom.users $RPM_BUILD_ROOT%{l_prefix}/etc/minicom/
- echo "root" >>$RPM_BUILD_ROOT%{l_prefix}/etc/minicom/minicom.users
- ( echo "pu baudrate 9600"
- echo "pu bits 8"
- echo "pu parity N"
- echo "pu stopbits 1"
- echo "pu minit ^M"
- echo "pu mreset ^M"
- echo "pu mhangup ^M"
- ) >minirc.dfl
- %{l_shtool} install -c -m 644 \
- minirc.dfl $RPM_BUILD_ROOT%{l_prefix}/etc/minicom/
- # strip binaries
- strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
- # determine installation files
- attr_cfg="644,uucp,%{l_mgrp}"
- attr_dev="4755,uucp,%{l_mgrp}"
- case "%{l_platform -t}" in
- *-freebsd* )
- attr_cfg="644,uucp,%{l_mgrp}"
- attr_dev="6755,uucp,dialer"
- ;;
- *-linux* )
- attr_cfg="644,%{l_musr},%{l_mgrp}"
- attr_dev="2755,%{l_musr},`ls -l /dev/ttyS0 | awk '{print $4;}'`"
- ;;
- *-sunos* )
- attr_cfg="644,uucp,%{l_mgrp}"
- attr_dev="4755,uucp,%{l_mgrp}"
- ;;
- *-darwin* )
- attr_cfg="644,%{l_musr},%{l_mgrp}"
- attr_dev="2755,%{l_musr},wheel"
- ;;
- esac
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- "%config %{l_prefix}/etc/minicom/*" \
- "%config %attr($attr_cfg) %{l_prefix}/etc/minicom/minirc.dfl" \
- "%attr($attr_dev) %{l_prefix}/bin/minicom"
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|