1 |
Name: eggdrop |
2 |
Version: 1.6.21 |
3 |
Release: %mkrel 2 |
4 |
Summary: IRC bot, written in C |
5 |
Source0: ftp://ftp.eggheads.org/pub/eggdrop/source/1.6/%{name}%{version}.tar.bz2 |
6 |
Patch4: eggdrop1.6.19-fix-str-fmt.patch |
7 |
Group: Networking/IRC |
8 |
BuildRequires: tcl tcl-devel perl |
9 |
URL: http://www.eggheads.org/ |
10 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
11 |
License: GPLv2+ |
12 |
|
13 |
%description |
14 |
Eggdrop is an IRC bot, written in C. If you don't know what IRC is, |
15 |
this is probably not whatever you're looking for! Eggdrop, being a |
16 |
bot, sits on a channel and takes protective measures: to keep the |
17 |
channel from being taken over (in the few ways that anything CAN), |
18 |
|
19 |
to recognize banished users or sites and reject them, to recognize |
20 |
privileged users and let them gain ops, etc. |
21 |
|
22 |
%prep |
23 |
%setup -q -n eggdrop%{version} |
24 |
%patch4 -p0 -b .str |
25 |
|
26 |
%build |
27 |
export CPPFLAGS="%{optflags} -DHAVE_TCL_THREADS" |
28 |
#any optimizations on PPC break bots |
29 |
%ifnarch ppc |
30 |
export CFLAGS="%optflags" |
31 |
%endif |
32 |
%configure2_5x --prefix=%{_prefix} --libdir=%{_libdir} |
33 |
|
34 |
make config |
35 |
|
36 |
#sed -i -e "s#LD = gcc#LD = gcc %ldflags#g" Makefile |
37 |
|
38 |
%make LD="gcc %ldflags" \ |
39 |
SHLIB_LD="gcc -shared -nostartfiles %ldflags" \ |
40 |
MOD_LD="gcc %ldflags" |
41 |
|
42 |
%install |
43 |
rm -rf $RPM_BUILD_ROOT |
44 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/eggdrop |
45 |
mkdir -p $RPM_BUILD_ROOT%{_libdir} |
46 |
mkdir -p $RPM_BUILD_ROOT%{_docdir}/eggdrop-%{version} |
47 |
mkdir -p $RPM_BUILD_ROOT%{_mandir} |
48 |
|
49 |
make install prefix=$RPM_BUILD_ROOT%{_libdir}/eggdrop |
50 |
cd $RPM_BUILD_ROOT |
51 |
mv $RPM_BUILD_ROOT%{_libdir}/eggdrop/doc/man1/ $RPM_BUILD_ROOT%{_mandir} |
52 |
|
53 |
#rpm installation complains otherwise due to rpm looking up the executables.. |
54 |
perl -pi -e s":/path/to/executable/eggdrop:%{_libdir}/eggdrop/eggdrop:" $RPM_BUILD_DIR/eggdrop%{version}/eggdrop.conf |
55 |
cp -fR $RPM_BUILD_DIR/eggdrop%{version}/eggdrop.conf $RPM_BUILD_ROOT%{_docdir}/eggdrop-%{version}/ |
56 |
#cp -Rf $RPM_BUILD_DIR/eggdrop%{version}/eggdrop.simple.conf $RPM_BUILD_ROOT%{_docdir}/eggdrop-%{version}/ |
57 |
cp -Rf $RPM_BUILD_DIR/eggdrop%{version}/scripts/botchk $RPM_BUILD_ROOT%{_docdir}/eggdrop-%{version}/ |
58 |
#cp -fR $RPM_BUILD_DIR/eggdrop%{version}/eggdrop.advanced.conf $RPM_BUILD_ROOT%{_docdir}/eggdrop-%{version}/ |
59 |
#cp -fR $RPM_BUILD_DIR/eggdrop%{version}/eggdrop.complete.conf $RPM_BUILD_ROOT%{_docdir}/eggdrop-%{version}/ |
60 |
#grumble rpm grumble wanted to require /path/to/eggdrop |
61 |
#bzip2 -9f $RPM_BUILD_ROOT%{_docdir}/eggdrop-%{version}/eggdrop.conf.dist |
62 |
|
63 |
rm -rf $RPM_BUILD_ROOT%{_libdir}/eggdrop/filesys |
64 |
cp -Rf $RPM_BUILD_ROOT%{_libdir}/eggdrop/doc/* $RPM_BUILD_ROOT%{_docdir}/eggdrop-%{version}/ |
65 |
rm -rf $RPM_BUILD_ROOT%{_libdir}/eggdrop/doc/ |
66 |
cp $RPM_BUILD_ROOT%{_libdir}/eggdrop/README $RPM_BUILD_ROOT%{_docdir}/eggdrop-%{version}/ |
67 |
|
68 |
# removing uneeded stuff |
69 |
rm -rf %{buildroot}%{_libdir}/eggdrop/README |
70 |
|
71 |
%clean |
72 |
rm -rf $RPM_BUILD_ROOT |
73 |
|
74 |
%files |
75 |
%defattr(-,root,root) |
76 |
%dir %{_libdir}/eggdrop |
77 |
%dir %{_libdir}/eggdrop/language |
78 |
%dir %{_libdir}/eggdrop/modules-%{version} |
79 |
%dir %{_libdir}/eggdrop/help |
80 |
%dir %{_libdir}/eggdrop/help/msg |
81 |
%dir %{_libdir}/eggdrop/help/set |
82 |
%dir %{_libdir}/eggdrop/scripts |
83 |
%dir %{_libdir}/eggdrop/logs |
84 |
%dir %{_libdir}/eggdrop/text |
85 |
%{_libdir}/eggdrop/language/*.lang |
86 |
%{_libdir}/eggdrop/text/* |
87 |
%{_libdir}/eggdrop/logs/* |
88 |
%{_libdir}/eggdrop/modules-%{version}/*.so |
89 |
%{_libdir}/eggdrop/eggdrop-%{version} |
90 |
%{_libdir}/eggdrop/eggdrop |
91 |
%{_libdir}/eggdrop/help/*.help |
92 |
%{_libdir}/eggdrop/help/msg/*.help |
93 |
%{_libdir}/eggdrop/help/set/*.help |
94 |
%{_libdir}/eggdrop/scripts/CONTENTS |
95 |
%{_libdir}/eggdrop/scripts/*.tcl |
96 |
%{_libdir}/eggdrop/scripts/botchk |
97 |
%{_libdir}/eggdrop/scripts/autobotchk |
98 |
%{_libdir}/eggdrop/scripts/weed |
99 |
%{_libdir}/eggdrop/eggdrop.conf |
100 |
%{_mandir}/man1/* |
101 |
|
102 |
%doc %{_docdir}/* |
103 |
%doc %{_libdir}/eggdrop/modules |
104 |
|
105 |
|