/[svn]/ircd-hybrid-7.2/contrib/ircd-hybrid.spec
ViewVC logotype

Annotation of /ircd-hybrid-7.2/contrib/ircd-hybrid.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 304 - (hide annotations)
Fri Dec 9 05:39:16 2005 UTC (14 years, 10 months ago) by lusky
File size: 3168 byte(s)
- bump patchlevel to 7.2.0
- update RELNOTES
- bump version in specfile


1 knight 31 # $Id$
2 adx 30
3     %{!?ircd_uid:%define ircd_uid 79}
4     %{!?ircd_gid:%define ircd_gid 79}
5     %{!?ircd_dir:%define ircd_dir /usr/local/ircd}
6    
7     Summary: IRCD-Hybrid - Internet Relay Chat server
8     Name: ircd-hybrid
9 lusky 304 Version: 7.2.0
10 adx 30 Release: 1
11     License: GPL
12     Group: System Environment/Daemons
13     URL: http://www.ircd-hybrid.org/
14     Source: %{name}-%{version}.tgz
15     BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
16     BuildPrereq: gcc, binutils, glibc-devel
17     Provides: ircd
18    
19     %description
20     IRCD-Hybrid is an Internet Relay Chat server
21    
22     %package devel
23     Group: Development/Libraries
24     Summary: include files for building IRCD-Hybrid modules
25    
26     %description devel
27     include files for building IRCD-Hybrid modules
28    
29     %package doc
30     Group: System Environment/Daemons
31     Summary: additional documentation for IRCD-Hybrid
32    
33     %description doc
34     additional documentation for IRCD-Hybrid
35    
36     %prep
37     %setup -q -n %{name}-%{version}
38    
39     %build
40     %configure \
41     --prefix=%{ircd_dir} \
42     --exec_prefix=%{ircd_dir} \
43     --bindir=%{ircd_dir}/bin \
44     --sysconfdir=%{ircd_dir}/etc \
45     --localstatedir=%{ircd_dir}
46    
47    
48     make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
49    
50     %install
51     [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
52     mkdir -p $RPM_BUILD_ROOT/%{ircd_dir}
53     mkdir -p $RPM_BUILD_ROOT/etc/init.d
54     make install DESTDIR=$RPM_BUILD_ROOT
55     sed -e "s|@bindir@|%{ircd_dir}/bin|g" \
56     -e "s|@sysconfdir@|%{ircd_dir}/etc|g" \
57     contrib/ircd.init.in > $RPM_BUILD_ROOT/etc/init.d/ircd
58     chmod 755 $RPM_BUILD_ROOT/etc/init.d/ircd
59     rm -rf $RPM_BUILD_ROOT/%{ircd_dir}/etc/*
60     mkdir -p $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}
61     cp -p LICENSE README.FIRST RELNOTES INSTALL $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}
62     cp -pr doc $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}
63     cp -fp etc/*.conf* $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}/doc
64     cp -p etc/simple.conf $RPM_BUILD_ROOT/%{ircd_dir}/etc/ircd.conf.simple
65     rm -rf $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}/doc/old
66    
67     %clean
68     [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
69    
70     %pre
71     /usr/sbin/groupadd -f -g %{ircd_gid} ircd 2> /dev/null || :
72     /usr/sbin/useradd -c "IRCD" -u %{ircd_uid} -g ircd \
73     -s /bin/false -r -d %{ircd_dir} ircd 2> /dev/null || :
74    
75     %post
76     /sbin/chkconfig --add ircd
77     cd %{ircd_dir}/etc
78     for i in cresv.conf dline.conf kline.conf nresv.conf xline.conf ; do
79     if [ ! -f "$i" ] ; then
80     touch $i
81     chown ircd:ircd $i
82     fi
83     done
84     if [ ! -f ircd.motd ] ; then
85     echo "Welcome to ircd-hybrid! This is the Message of the Day" > ircd.motd
86     fi
87     if [ ! -f ircd.conf ] ; then
88     sed \
89     -e "s/irc.example.com/`hostname`/" \
90     -e "s/_CHANGE_ME_/9ZZ/" \
91     ircd.conf.simple > ircd.conf
92     fi
93    
94     %preun
95     if [ $1 = 0 ]; then
96     /sbin/service ircd stop > /dev/null 2>&1
97     /sbin/chkconfig --del ircd
98     fi
99    
100    
101     %files
102     %defattr(-,root,root)
103     %{ircd_dir}/bin
104     %dir %attr(700,ircd,ircd) %{ircd_dir}/etc
105     %attr(600,ircd,ircd) %{ircd_dir}/etc/ircd.conf.simple
106     %attr(700,ircd,ircd) %{ircd_dir}/logs
107     %{ircd_dir}/modules
108     %{_mandir}
109     /etc/init.d/ircd
110     %{_docdir}/%{name}-%{version}/LICENSE
111     %{_docdir}/%{name}-%{version}/README.FIRST
112     %{_docdir}/%{name}-%{version}/RELNOTES
113     %{_docdir}/%{name}-%{version}/INSTALL
114    
115     %files devel
116     %defattr(-,root,root)
117     %{_includedir}
118    
119     %files doc
120     %defattr(-,root,root)
121     %{_docdir}/%{name}-%{version}/doc

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28