mw.spec 4.23 KB
Newer Older
1
%{expand: %%global changeset %(cat mw.rev)}
Peter Berry's avatar
Peter Berry committed
2 3
Summary: Milliways III talker and BBS
Name: mw3
4
Version: 2.17.%{changeset}
Justin Mitchell's avatar
Justin Mitchell committed
5
Release: 1
6
License: GPLv2
Peter Berry's avatar
Peter Berry committed
7 8 9
Group: Applications/Communications
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-root
10 11 12 13
Requires: readline sqlite curl
#Requires(post): systemd-units
#Requires(preun): systemd-units
#Requires(postun): systemd-units
14
BuildRequires: libtermcap-devel readline-devel glibc-devel sqlite-devel curl-devel openssl-devel jansson-devel postgresql-devel
15
URL: http://projects.sucs.org/projects/mw/
Peter Berry's avatar
Peter Berry committed
16 17 18 19 20 21 22 23 24

%description
An integrated talker and BBS (bulletin board system) with a peer-to-peer
architecture, intended to be used over telnet or similar.

%prep
%setup -q

%build
Andrew Price's avatar
Andrew Price committed
25
make libdir="%{_libdir}" bindir="%{_bindir}" RELEASE_BUILD=1
Peter Berry's avatar
Peter Berry committed
26 27

%install
28
make DESTDIR=$RPM_BUILD_ROOT prefix=/usr libdir="%{_libdir}" install
29 30
# We have a systemd unit file for mwserv so remove the sysv initscript
rm -rf $RPM_BUILD_ROOT/etc/init.d
31 32
#install -Dm 0644 mw.service $RPM_BUILD_ROOT/%{_unitdir}/mwserv
install -Dm 0644 mwserv.init $RPM_BUILD_ROOT/%{_initrddir}/mwserv
Justin Mitchell's avatar
Justin Mitchell committed
33
install -D mozjs/%{_libdir}/libmozjs-17.0.so $RPM_BUILD_ROOT/%{_libdir}/
34
mv $RPM_BUILD_ROOT%{_libdir}/mw/mwserv $RPM_BUILD_ROOT%{_bindir}
35
%find_lang mw
36 37 38

%clean
rm -fr $RPM_BUILD_ROOT
Peter Berry's avatar
Peter Berry committed
39 40 41 42

%pre
# Add the user "mw"
/usr/sbin/useradd -c "mw system" \
43
    -s /sbin/nologin -r -d %{_libdir}/mw mw 2> /dev/null || :
Peter Berry's avatar
Peter Berry committed
44

45 46 47 48
%post
if [ $1 -eq 1 ] ; then 
    # Initial installation (disabled by default)
    # To enable after installation, do systemctl enable mw.service
49 50
#/bin/systemctl daemon-reload >/dev/null 2>&1 || :
    /sbin/chkconfig mwserv on
51 52 53 54 55
fi

%preun
if [ $1 -eq 0 ] ; then
    # Package removal, not upgrade
56 57 58 59
#    /bin/systemctl --no-reload disable mw.service > /dev/null 2>&1 || :
#    /bin/systemctl stop mw.service > /dev/null 2>&1 || :
    /sbin/service mwserv stop
    /sbin/chkconfig mwserv off
60 61 62
fi

%postun
63
#/bin/systemctl daemon-reload >/dev/null 2>&1 || :
64 65
if [ $1 -ge 1 ] ; then
    # Package upgrade, not uninstall
66
    #/bin/systemctl try-restart mw.service >/dev/null 2>&1 || :
67 68
fi

69
%files -f mw.lang
Peter Berry's avatar
Peter Berry committed
70 71
%defattr (755,mw,mw)
%dir %{_libdir}/mw
72
%{_libdir}/mw/colour
Justin Mitchell's avatar
Justin Mitchell committed
73
%{_libdir}/libmozjs-17.0.so
74
%attr(755,mw,mw) %dir /var/log/mw
75
%attr(711,mw,mw) %dir /var/lib/mw
76
%attr(755,mw,mw) %dir /var/run/mw
Steve Hill's avatar
Steve Hill committed
77
%config %attr(640,mw,mw) %{_libdir}/mw/login.banner
Peter Berry's avatar
Peter Berry committed
78 79 80 81
%{_libdir}/mw/help
%{_libdir}/mw/scripthelp
%{_libdir}/mw/talkhelp
%{_libdir}/mw/wizhelp
82 83
%{_initrddir}/mwserv
#%{_unitdir}/mw.service
Peter Berry's avatar
Peter Berry committed
84
%attr (4711,mw,mw) %{_bindir}/mw
85 86
%attr (755,mw,mw) %{_bindir}/mwserv
%attr (4711,mw,mw) %{_libdir}/mw/mwpoll
87 88 89 90
%doc %{_libdir}/mw/COPYING
%doc %{_libdir}/mw/INSTALL
%doc %{_libdir}/mw/LICENSE
%doc %{_libdir}/mw/README
Peter Berry's avatar
Peter Berry committed
91 92

%changelog
93 94 95
* Wed Dec 12 2012 Thomas Lake <tswsl1989@sucs.org>
- Add build dependency for postgresql-devel

96 97 98
* Sat Dec 08 2012 Andrew Price <welshbyte@sucs.org>
- Bump to 2.17.* and add mwserv-related files

99 100 101
* Sat Apr 12 2008 Andrew Price <welshbyte@sucs.org>
- release 2.16.1033 including file layout changes

Graham Cole's avatar
Graham Cole committed
102 103 104
* Wed Mar 19 2008 Graham Cole <chckens@sucs.org>
- release 2.15.1011 hopefully killing off Alarm clock crashes

Justin Mitchell's avatar
Justin Mitchell committed
105 106 107
* Fri Jun 15 2007 Justin Mitchell <arthur@sucs.org>
- release 2.15.1 with psycodoms javascript and other bugfixes

108 109 110
* Sat Jul 29 2006 Peter Berry <pwb@sucs.org>
- Release 2: new iconv code and fixed some x86-64 bugs

111 112 113 114
* Sun Jun 4 2006 Peter Berry <pwb@sucs.org>
- First release of 2.14.3.
- Lots of fixes, in particular .notsayto now makes sure the user is on.

115 116 117
* Sat Apr 29 2006 Peter Berry <pwb@sucs.org>
- Release 2: Moved -devel deps to BuildRequires

Peter Berry's avatar
Peter Berry committed
118 119 120 121 122 123
* Thu Mar 23 2006 Peter Berry <pwb@sucs.org>
- First release of 2.14.2 preparing for x86-64 build
- Fixed: credits, jive gag
- Added: saya gag, lots of mud rooms from old "make install" in /usr/local
- Changed: gag tables moved into a new source file, portability changes, use gnu99

Peter Berry's avatar
Peter Berry committed
124 125 126
* Tue Nov 29 2005 Peter Berry <pwb@sucs.org>
- Release 3: Fixed bugs relating to out of range board messages

Peter Berry's avatar
Peter Berry committed
127 128 129
* Thu Oct 27 2005 Peter Berry <pwb@sucs.org>
- Release 2: fixed permissions on the colour directory

Peter Berry's avatar
Peter Berry committed
130 131 132
* Thu Oct 27 2005 Peter Berry <pwb@sucs.org>
- Initial release of version 2.14.1 with !locale and !charset commands

133
* Thu Sep 22 2005 Peter Berry <pwb@sucs.org>
134
- Fixed export of _bindir to make in build
135 136

* Wed Jan 19 2005 Peter Berry <pwb@sucs.org>
Peter Berry's avatar
Peter Berry committed
137
- Initial RPM release.