# $Id: ITO.spec,v 1.18 2012/07/27 15:28:27 ksb Exp $ # $KeyFile: ${echo:-echo} conserver.m %define _tmpdir /tmp %define _local_prefix /usr/local %define _local_bindir %{_local_prefix}/sbin %define _local_mandir %{_local_prefix}/man/man8 %define _initdir /etc/init.d # for signing of packages #%_signature gpg #%_gpg_name FIXME@example.org # %dist should be defined on the target but in case it isn't we can guess one %define distguess %(cat /etc/{redhat,fedora,suse,ubuntu}-release | sed -e 's/Fedora Core/fc@/; s/Fedora/f@/; s/Red Hat[^0-9]*\(Enterprise|Server\)*[^0-9]*/rhel@/; s/Red Hat[^0-9]*/rh/; s/.*Suse[^0-9]*/se@/; s/Ubuntu[^0-9]*/ubuntu@/; s/@[^0-9]*//;s/\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)/\1_\2/; s/[^0-9]*$//') %{!?dist:%define dist .%{distguess}} # Do not generate debugging packages by default - older versions of rpmbuild # (like RehHat 6.2) choke on the line with the percent in the macro name: # We need a sed spell on RH6.x to "s/\(^.define \)%d/\1d/", Sigh. -- ksb %define debug_package %{nil} Name: conserver Version: 8.10 Release: 9%{?dist} BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release} Vendor: NPCGuild.org Summary: NPC conserver and console client programs Group: Utilities License: BSD URL: http://patch.sac.fedex.com/RPMS Source: http://patch.sac.fedex.com/tarball/%{name}-%{version}.tgz BuildRequires: gcc m4 msrc_base install_base # Autoreq:0 prevents misleading depencies from being generated. Normally, this # is perfectly sane; however, the system is picking up mk directives and # mkcmd directives as well as system depencies. Autoreq: 0 Requires: install_base %description The conserver is middleware between the serial muxes ( Digi, Lantronix ) and administrative hosts. It can talk direct to serial devices and exec() stuff. console is the client to the conserver. %prep %setup -q %build %install umask 022 mkdir -p %{buildroot}/%{_local_bindir} mkdir -p %{buildroot}/%{_local_mandir} mkdir -p %{buildroot}/%{_initdir} F=`mktemp -d /tmp/bmHMXXXXXX` mmsrc -y INTO=$F -Cauto.cf -DSERVER=localhost -DMAXMEMB=80 -DMAXGRP=320 -- make DESTDIR=%{buildroot} install mk -mInstall -D DESTDIR=%{buildroot} *.man mk -mInstallRPM -D DESTDIR=%{buildroot} conserver.sh rm -rf $F find %{buildroot} -depth -type d -name OLD -exec rm -rf \{\} \; %clean # Do not confilct with the next user of the fixed-path build directory rm -rf %{buildroot} %files %defattr(-,root,root) %{_local_bindir}/%{name} %{_local_bindir}/console /etc/init.d/conserver.sh %doc %{_local_mandir}/ %post grep ^console /etc/services >/dev/null || ( cat /etc/services ; echo "console 782/tcp conserver # Purdue/Ohio State conserver" ) | /usr/local/bin/install - /etc/services chkconfig --add conserver.sh %changelog * Fri Jul 27 2012 KS Braunsdorf - partial port to DARWIN (MacOS X.7 and *) * Thu Mar 1 2012 KS Braunsdorf - minor uprev for new manual page and different default table sizes - Makefile.host now passes table size tunes correctly * Fri Jun 18 2010 E Anderson - Built the RPM spec file and added it to the msrc cache