Sophie

Sophie

distrib > PLD > ra > i386 > media > dist-src > by-pkgid > b1efd2ced2c7ebf8a97f7143c892cef5 > files > 8

ircd-2.10.3p3-3.src.rpm

# $Revision: 1.49 $, $Date: 2002/08/17 21:01:35 $
#
# Conditional build:
# _with_hm	- with soper/hawkmod patch, but without hoop3.
# _without_ip6	- without ipv6 support.
#
Summary:	Internet Relay Chat Server
Summary(pl):	Serwer IRC (Internet Relay Chat)
Name:		ircd
Version:	2.10.3p3
Release:	3
License:	GPL
Group:		Daemons
Source0:	ftp://ftp.irc.org/irc/server/irc%{version}.tgz
Source1:	%{name}.init
Source2:	%{name}.sysconfig
Source3:	%{name}.logrotate
Patch0:		%{name}-config.patch
Patch1:		%{name}-linux.patch
Patch2:		%{name}-hm.patch
# Orginal: http://jv.irc.cz/hoop3.diff - modified because we have
# MAX_CONNECTIONS already redefined in ircd-config.patch.
# Also MIN_CHANOP_SERV, MIN_CHANOP_CHAN, MIN_CHANOP_USR to 0.
Patch3:		%{name}-hoop3.diff
URL:		http://www.irc.org/
#BuildRequires:	autoconf
BuildRequires:	ncurses-devel
BuildRequires:	textutils
BuildRequires:	zlib-devel
Prereq:		rc-scripts
Requires(pre):	/usr/bin/getgid
Requires(pre):	/bin/id
Requires(pre):	/usr/sbin/groupadd
Requires(pre):	/usr/sbin/useradd
Requires(post):	fileutils
Requires(post,preun):	/sbin/chkconfig
Requires(postun):	/usr/sbin/userdel
Requires(postun):	/usr/sbin/groupdel
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Obsoletes:	ircd-hybrid

%define		_sysconfdir	/etc/%{name}
%define		_localstatedir	/var/lib/%{name}

%description
Ircd is the server (daemon) program for the Internet Relay Chat
Program. This version supports IPv6, too.

%description -l pl
Ircd jest serwerem us³ugi IRC (Internet Relay Chat Program). Ta wersja
wspiera tak¿e protokó³ IPv6.

%prep
%setup -q -n irc%{version}
%patch0 -p1
%patch1 -p1
%{?_with_hm:%patch2 -p1}
%{?!_with_hm:%patch3 -p1}

%build
#cd support
#	autoheader
#	autoconf
#cd ..

%configure2_13 \
	--logdir=%{_var}/log/%{name} \
	--enable-dsm \
	--with-zlib \
%{?!_without_ip6:--enable-ip6}

cd "`support/config.guess`"
%{__make} all

%install
rm -rf $RPM_BUILD_ROOT

cd "`support/config.guess`"
install -d $RPM_BUILD_ROOT%{_var}/log/ircd
install -d $RPM_BUILD_ROOT%{_libdir}/ircd
install -d $RPM_BUILD_ROOT%{_sbindir}
install -d $RPM_BUILD_ROOT%{_mandir}/man{1,3,5,8}
install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,logrotate.d}}
install -d $RPM_BUILD_ROOT%{_localstatedir}

%{__make} install DESTDIR=$RPM_BUILD_ROOT \
	     client_man_dir=$RPM_BUILD_ROOT%{_mandir}/man1 \
	     conf_man_dir=$RPM_BUILD_ROOT%{_mandir}/man5 \
	     server_man_dir=$RPM_BUILD_ROOT%{_mandir}/man8

install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}

%{?!_without_ip6:tr ':' '%' < $RPM_BUILD_ROOT%{_sysconfdir}/example.conf > $RPM_BUILD_ROOT%{_sysconfdir}/ircd.conf}
%{?_without_ip6:install $RPM_BUILD_ROOT%{_sysconfdir}/example.conf $RPM_BUILD_ROOT%{_sysconfdir}/ircd.conf}

rm -f $RPM_BUILD_ROOT%{_sysconfdir}/example.conf

cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/ircd.motd

Powered by PLD Linux Distribution IRC Server with IPv6 support!

IRC:    irc.pld.org.pl irc6.pld.org.pl
WWW:        http://www.pld.org.pl/
FTP:        ftp://ftp.pld.org.pl/
e-mail:      feedback@pld.org.pl

EOF

mv -f $RPM_BUILD_ROOT%{_bindir}/irc $RPM_BUILD_ROOT%{_bindir}/ircs
mv -f $RPM_BUILD_ROOT%{_mandir}/man1/irc.1 $RPM_BUILD_ROOT%{_mandir}/man1/ircs.1

touch $RPM_BUILD_ROOT%{_localstatedir}/ircd.{pid,tune}

%clean
rm -rf $RPM_BUILD_ROOT

%pre
if [ -n "`getgid ircd`" ]; then
	if [ "`getgid ircd`" != "75" ]; then
		echo "Error: group ircd doesn't have gid=75. Correct this before installing ircd." 1>&2
		exit 1
	fi
else
	%{_sbindir}/groupadd -f -g 75 ircd 2> /dev/null
fi
if [ -n "`id -u ircd 2>/dev/null`" ]; then
	if [ "`id -u ircd`" != "75" ]; then
		echo "Error: user ircd doesn't have uid=75. Correct this before installing ircd." 1>&2
		exit 1
	fi
else
	%{_sbindir}/useradd -g ircd -d /etc/%{name} -u 75 -s /bin/true -c "IRC Service account" ircd 2> /dev/null
fi

%post
/sbin/chkconfig --add ircd
if [ -f /var/lock/subsys/ircd ]; then
	/etc/rc.d/init.d/ircd restart 1>&2
else
	echo "Run \"/etc/rc.d/init.d/ircd start\" to start IRC daemon."
fi
touch /var/log/ircd/{auth,opers,rejects,users,ircd.log}
chmod 640 /var/log/ircd/*
chown ircd.ircd /var/log/ircd/*

%preun
# If package is being erased for the last time.
if [ "$1" = "0" ]; then
	if [ -f /var/lock/subsys/ircd ]; then
		/etc/rc.d/init.d/ircd stop 1>&2
	fi
	/sbin/chkconfig --del ircd
fi

%postun
# If package is being erased for the last time.
if [ "$1" = "0" ]; then
	%{_sbindir}/userdel ircd 2> /dev/null
	%{_sbindir}/groupdel ircd 2> /dev/null
fi

%files
%defattr(644,root,root,755)
%doc doc/{2.10-New,2.9-New,Authors,ChangeLog,Etiquette,SERVICE.txt,m4macros}
%doc doc/{example.conf,rfc*.txt,README,RELEASE_{LOG,NOTES}}
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_sbindir}/*
%attr(770,root,ircd) %dir %{_var}/log/ircd
%attr(770,root,ircd) %dir %{_localstatedir}
%attr(640,ircd,ircd) %ghost %{_localstatedir}/ircd.pid
%attr(640,ircd,ircd) %ghost %{_localstatedir}/ircd.tune
%attr(750,root,ircd) %dir %{_sysconfdir}
%attr(660,root,ircd) %config(noreplace) %{_sysconfdir}/ircd.conf
%attr(660,root,ircd) %config(noreplace) %{_sysconfdir}/iauth.conf
%attr(664,root,ircd) %{_sysconfdir}/ircd.m4
%attr(664,root,ircd) %{_sysconfdir}/ircd.motd
%{_mandir}/man*/*
%attr(754,root,root) /etc/rc.d/init.d/%{name}
%attr(644,root,root) /etc/sysconfig/%{name}

%define date    %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback@pld.org.pl>
All persons listed below can be reached at <cvs_login>@pld.org.pl

$Log: ircd.spec,v $
Revision 1.49  2002/08/17 21:01:35  qboosh
- better messages in pre, added Requires(), release 3

Revision 1.48  2002/06/12 18:56:27  kloczek
- adapterized.

Revision 1.47  2002/06/12 00:59:20  baseciq
- added hoop3
- rel.2

Revision 1.46  2002/06/12 00:20:43  baseciq
- added ircd.logrotate
- bcond without ip6
- new %doc
- fixed %post
- added logs to %post
- more docs
- cosmetics

Revision 1.45  2002/06/10 19:28:13  baseciq
- cosmetics

Revision 1.44  2002/06/10 18:39:54  wojrus
- added hawkmod patch
- cosmetics

Revision 1.43  2002/06/10 14:13:16  djrzulf
- cosmetics,

Revision 1.42  2002/06/09 20:50:04  djrzulf
- moved chrooted ircd to DEVEL branch, this ircd comiling fine i think there're
  some problels with config.h,

Revision 1.34  2002/05/01 21:56:48  wojrus
- cosmetics

Revision 1.33  2002/04/27 15:29:13  wojrus
- write access to config files for group

Revision 1.32  2002/04/27 13:24:19  wojrus
- new version. (2.10.3)

Revision 1.31  2002/04/25 16:37:32  arturs
fixed a small typo

Revision 1.30  2002/04/24 06:49:14  marcus
- rel.2.

Revision 1.29  2002/02/23 02:59:07  kloczek
- adapterized.

Revision 1.28  2002/02/22 23:29:04  kloczek
- removed all Group fields translations (our rpm now can handle translating
  Group field using gettext).

Revision 1.27  2002/01/18 02:13:21  kloczek
perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"

Revision 1.26  2001/10/21 06:08:53  orzech
- update to 2.10.3p3 (bugfixes and speedups), NFY

Revision 1.25  2001/10/06 18:17:44  qboosh
- BuildRequires: autoconf
- changed "pld-list" to "feedback" in motd

Revision 1.24  2001/10/06 13:11:27  blues
- URL updated
- cosmetics

Revision 1.23  2001/07/26 05:42:09  saq
- reverting last change: removing new macros from %p{re,ost}{,un}

Revision 1.21  2001/05/30 14:08:46  blues
- added sysconfig-file
- modified init-file. Now it checks if daemon is started.
- modified way of making ircd user and group (apache-like)
- few cosmetics
STBR

Revision 1.20  2001/05/23 02:14:54  qboosh
- use %%rpmldflags

Revision 1.19  2001/02/01 16:27:34  kloczek
- Requires for rc-scripts changed to Prereq.

Revision 1.18  2000/12/09 17:55:14  jajcus
- file owners fixed (semi-automatically)
  (no special user (like http/news) should own his home directory nor
  files it doesn't create)

Revision 1.17  2000/08/24 17:21:22  zagrodzki
- updated to 2.10.3p1
- localstatedir -> /var/lib/ircd
- added some files
- removed INSTALL.gz
- --with-zlib is the default, when zlib-devel is installed

Revision 1.16  2000/08/23 20:50:04  zagrodzki
- converted remaining %{_sysconfdir}/%{name}

Revision 1.15  2000/08/23 20:46:12  zagrodzki
- added missing %%define
- adapterized

Revision 1.14  2000/08/23 20:45:16  zagrodzki
- release 4
- no_libnsl patch
- partly rewritten (more macros, -with-zlib is the default...)

Revision 1.13  2000/08/02 18:10:48  mis
- repaired what I corrupted: back to useradd without -m (this copies /etc/skel)

Revision 1.12  2000/07/31 12:03:39  mis
- added -m to useradd to allow it create $HOME for added user(s)

Revision 1.11  2000/06/09 07:23:03  kloczek
- added using %%{__make} macro.

Revision 1.10  2000/04/01 11:14:46  zagrodzki
- changed all BuildRoot definitons
- removed all applnkdir defs
- changed some prereqs/requires
- removed duplicate empty lines

Revision 1.9  2000/03/28 16:54:34  baggins
- translated kloczkish into english

Revision 1.8  2000/03/28 13:09:10  baggins
- release ++
- updated init script to rc-scripts 0.2.0

Revision 1.7  1999/12/25 23:43:25  alchemyx
- removed -M option from useradd

Revision 1.6  1999/09/11 13:47:16  misiek
- fixed requires (PR#39)

Revision 1.5  1999/09/09 13:15:36  misiek
- updated to 2.10.3

Revision 1.4  1999/08/02 10:11:30  misiek
update/new specs