| 1 | # Make sure to update these to coincide with the most recent debathena-moira | 
|---|
| 2 | # release from http://debathena.mit.edu/apt/pool/debathena/d/debathena-moira/ | 
|---|
| 3 | %define upstreamversion 4.0.0 | 
|---|
| 4 | %define snapshotversion svn20100405 | 
|---|
| 5 | Summary: moira libraries, clients, and friends | 
|---|
| 6 | Group: Applications/System | 
|---|
| 7 | Name: moira | 
|---|
| 8 | Version: %{upstreamversion} | 
|---|
| 9 | Release: 6.%{scriptsversion}.%{snapshotversion} | 
|---|
| 10 | Vendor: The scripts.mit.edu Team (scripts@mit.edu) | 
|---|
| 11 | URL: http://scripts.mit.edu | 
|---|
| 12 | License: MIT | 
|---|
| 13 | Source: debathena-%{name}_%{upstreamversion}+%{snapshotversion}.orig.tar.gz | 
|---|
| 14 | BuildRoot: %{_tmppath}/%(%{__id_u} -n)-%{name}-%{version}-root | 
|---|
| 15 | #TODO: might really need mit-zephyr-devel, something for autotools-dev | 
|---|
| 16 | BuildRequires: readline-devel, e2fsprogs-devel, ncurses-devel, krb5-devel, hesiod-devel | 
|---|
| 17 | Patch1: moira-update-server.rc.patch | 
|---|
| 18 | Patch2: moira-fix-manpage-paths.patch | 
|---|
| 19 |  | 
|---|
| 20 | %description | 
|---|
| 21 | The moira library and clients.  Clone of debathena-moira. | 
|---|
| 22 | See http://scripts.mit.edu/wiki for more information. | 
|---|
| 23 |  | 
|---|
| 24 | %prep | 
|---|
| 25 | %setup -q -n debathena-%{name}-%{upstreamversion}+%{snapshotversion} | 
|---|
| 26 | %patch1 | 
|---|
| 27 | %patch2 -p1 | 
|---|
| 28 |  | 
|---|
| 29 | %build | 
|---|
| 30 | # Hack: Add /usr/include/et to put com_err.h on the C include path. | 
|---|
| 31 | # Can remove this once the maintainer of the relevant package symlinks | 
|---|
| 32 | # com_err.h in /usr/include. | 
|---|
| 33 | # (See https://bugzilla.redhat.com/show_bug.cgi?id=550889) | 
|---|
| 34 | # TODO: --with-zephyr is currently borked | 
|---|
| 35 | %configure --without-krb4 --with-krb5 --with-hesiod --without-zephyr --without-oracle --without-afs --disable-rpath --with-com_err=/usr CFLAGS='-I /usr/include/et' | 
|---|
| 36 | make %{?_smp_mflags} | 
|---|
| 37 |  | 
|---|
| 38 | %install | 
|---|
| 39 | rm -rf %{buildroot} | 
|---|
| 40 | make install DESTDIR=%{buildroot} | 
|---|
| 41 | mv %{buildroot}/%{_bindir}/chfn %{buildroot}/%{_bindir}/chfn.moira | 
|---|
| 42 | mv %{buildroot}/%{_bindir}/chsh %{buildroot}/%{_bindir}/chsh.moira | 
|---|
| 43 | mv %{buildroot}/%{_mandir}/man1/chsh.1 \ | 
|---|
| 44 | %{buildroot}/%{_mandir}/man1/chsh.moira.1 | 
|---|
| 45 | mv %{buildroot}/%{_mandir}/man1/chfn.1 \ | 
|---|
| 46 | %{buildroot}/%{_mandir}/man1/chfn.moira.1 | 
|---|
| 47 | install -m 755 -d %{buildroot}/%{_initddir} | 
|---|
| 48 | install -m 755 moira-update-server.init %{buildroot}/%{_initddir}/moira-update-server | 
|---|
| 49 | # Hack: These man files are installed but no package uses them | 
|---|
| 50 | rm %{buildroot}/%{_mandir}/man8/dcm.8 | 
|---|
| 51 | rm %{buildroot}/%{_mandir}/man8/moirad.8 | 
|---|
| 52 | rm %{buildroot}/%{_mandir}/man8/reg_svr.8 | 
|---|
| 53 | rm %{buildroot}/%{_mandir}/man8/setquota.8 | 
|---|
| 54 | rm %{buildroot}/%{_mandir}/man8/startdcm.8 | 
|---|
| 55 | rm %{buildroot}/%{_mandir}/man8/startmoira.8 | 
|---|
| 56 | rm %{buildroot}/%{_mandir}/man8/startreg.8 | 
|---|
| 57 |  | 
|---|
| 58 | %clean | 
|---|
| 59 | rm -rf %{buildroot} | 
|---|
| 60 |  | 
|---|
| 61 | # clients | 
|---|
| 62 | %package clients | 
|---|
| 63 | Summary: Clients for the Moira database | 
|---|
| 64 | Group: Applications/System | 
|---|
| 65 | # Might need mit-zephyr-devel | 
|---|
| 66 | # Requires: mit-zephyr | 
|---|
| 67 | %description clients | 
|---|
| 68 | Moira is the Athena Service Management system.  It serves as the | 
|---|
| 69 | central repository for information about users, groups hosts, print | 
|---|
| 70 | queues, and several other aspects of the Athena environment. | 
|---|
| 71 |  | 
|---|
| 72 | This package contains clients such as moira, stella, blanche, etc. | 
|---|
| 73 |  | 
|---|
| 74 | %files clients | 
|---|
| 75 | %defattr(755,root,root) | 
|---|
| 76 | %{_bindir}/addusr | 
|---|
| 77 | %{_bindir}/blanche | 
|---|
| 78 | %{_bindir}/chfn.moira | 
|---|
| 79 | %{_bindir}/chpobox | 
|---|
| 80 | %{_bindir}/chsh.moira | 
|---|
| 81 | %{_bindir}/eunice | 
|---|
| 82 | %{_bindir}/mitch | 
|---|
| 83 | %{_bindir}/namespace | 
|---|
| 84 | %{_bindir}/moira | 
|---|
| 85 | %{_bindir}/mrcheck | 
|---|
| 86 | %{_bindir}/mrtest | 
|---|
| 87 | %{_bindir}/stanley | 
|---|
| 88 | %{_bindir}/stella | 
|---|
| 89 | %{_bindir}/mailmaint | 
|---|
| 90 | %{_bindir}/listmaint | 
|---|
| 91 | %{_bindir}/dcmmaint | 
|---|
| 92 | %{_bindir}/usermaint | 
|---|
| 93 | %{_bindir}/update_test | 
|---|
| 94 | %defattr(-,root,root) | 
|---|
| 95 | %doc %{_mandir}/man1/* | 
|---|
| 96 | %doc %{_mandir}/man8/mrtest.8.gz | 
|---|
| 97 |  | 
|---|
| 98 |  | 
|---|
| 99 | # update-server | 
|---|
| 100 | %package update-server | 
|---|
| 101 | Summary: Athena update_server | 
|---|
| 102 | Group: Applications/System | 
|---|
| 103 | # Might need mit-zephyr-devel | 
|---|
| 104 | # Requires: mit-zephyr | 
|---|
| 105 | Requires(post): chkconfig | 
|---|
| 106 | Requires(preun): chkconfig | 
|---|
| 107 | %description update-server | 
|---|
| 108 | Moira is the Athena Service Management system.  It serves as the | 
|---|
| 109 | central repository for information about users, groups hosts, print | 
|---|
| 110 | queues, and several other aspects of the Athena environment. | 
|---|
| 111 |  | 
|---|
| 112 | This package contains the update_server daemon, which is used for | 
|---|
| 113 | servers that automatically receive information dumps from moira. | 
|---|
| 114 |  | 
|---|
| 115 | %files update-server | 
|---|
| 116 | %defattr(-,root,root) | 
|---|
| 117 | %doc %{_mandir}/man8/update_server.8.gz | 
|---|
| 118 | %config(noreplace) %{_sysconfdir}/moira.conf | 
|---|
| 119 | %defattr(755,root,root) | 
|---|
| 120 | %{_sbindir}/update_server | 
|---|
| 121 | %{_initddir}/moira-update-server | 
|---|
| 122 |  | 
|---|
| 123 | %post update-server | 
|---|
| 124 | /sbin/chkconfig --add moira-update-server | 
|---|
| 125 | %{_initddir}/moira-update-server condrestart | 
|---|
| 126 |  | 
|---|
| 127 | %preun update-server | 
|---|
| 128 | if [ $1 = 0 ] ; then | 
|---|
| 129 | /sbin/service moira-update-server stop >/dev/null 2>&1 | 
|---|
| 130 | /sbin/chkconfig --del moira-update-server | 
|---|
| 131 | fi | 
|---|
| 132 |  | 
|---|
| 133 | # libmoira0 | 
|---|
| 134 | %package -n libmoira0 | 
|---|
| 135 | Summary: The Moira library | 
|---|
| 136 | Group: System Environment/Libraries | 
|---|
| 137 | %description -n libmoira0 | 
|---|
| 138 | Moira is the Athena Service Management system.  It serves as the | 
|---|
| 139 | central repository for information about users, groups hosts, print | 
|---|
| 140 | queues, and several other aspects of the Athena environment. | 
|---|
| 141 |  | 
|---|
| 142 | This package contains the shared Moira library. | 
|---|
| 143 |  | 
|---|
| 144 | %post -n libmoira0 -p /sbin/ldconfig | 
|---|
| 145 | %postun -n libmoira0 -p /sbin/ldconfig | 
|---|
| 146 |  | 
|---|
| 147 | %files -n libmoira0 | 
|---|
| 148 | %defattr(-,root,root) | 
|---|
| 149 | %{_libdir}/libmoira.so.* | 
|---|
| 150 |  | 
|---|
| 151 | # libmoira-devel | 
|---|
| 152 | %package -n libmoira-devel | 
|---|
| 153 | Summary: Development files for Moira library | 
|---|
| 154 | Group: Development/Libraries | 
|---|
| 155 | # Might need mit-zephyr-devel | 
|---|
| 156 | # Requires: mit-zephyr | 
|---|
| 157 | Requires: libmoira0 = %{version}-%{release}, e2fsprogs-devel, krb5-devel, hesiod-devel | 
|---|
| 158 | %description -n libmoira-devel | 
|---|
| 159 | Moira is the Athena Service Management system.  It serves as the | 
|---|
| 160 | central repository for information about users, groups hosts, print | 
|---|
| 161 | queues, and several other aspects of the Athena environment. | 
|---|
| 162 |  | 
|---|
| 163 | This package contains headers and static libraries for development. | 
|---|
| 164 |  | 
|---|
| 165 | %post -n libmoira-devel -p /sbin/ldconfig | 
|---|
| 166 | %postun -n libmoira-devel -p /sbin/ldconfig | 
|---|
| 167 |  | 
|---|
| 168 | %files -n libmoira-devel | 
|---|
| 169 | %defattr(-,root,root) | 
|---|
| 170 | %{_includedir}/moira | 
|---|
| 171 | %exclude %{_includedir}/moira/mrclient.h | 
|---|
| 172 | %doc %{_mandir}/man3/* | 
|---|
| 173 | %{_libdir}/libmoira.so | 
|---|
| 174 | %{_libdir}/libmoira.la | 
|---|
| 175 | %{_libdir}/libmoira.a | 
|---|
| 176 |  | 
|---|
| 177 | # libmrclient0 | 
|---|
| 178 | %package -n libmrclient0 | 
|---|
| 179 | Summary: The Moira client library | 
|---|
| 180 | Group: System Environment/Libraries | 
|---|
| 181 | %description -n libmrclient0 | 
|---|
| 182 | Moira is the Athena Service Management system.  It serves as the | 
|---|
| 183 | central repository for information about users, groups hosts, print | 
|---|
| 184 | queues, and several other aspects of the Athena environment. | 
|---|
| 185 |  | 
|---|
| 186 | This package contains the shared Moira client library. | 
|---|
| 187 |  | 
|---|
| 188 | %post -n libmrclient0 -p /sbin/ldconfig | 
|---|
| 189 | %postun -n libmrclient0 -p /sbin/ldconfig | 
|---|
| 190 |  | 
|---|
| 191 | %files -n libmrclient0 | 
|---|
| 192 | %defattr(-,root,root) | 
|---|
| 193 | %{_libdir}/libmrclient.so.* | 
|---|
| 194 |  | 
|---|
| 195 | # libmrclient-devel | 
|---|
| 196 | %package -n libmrclient-devel | 
|---|
| 197 | Summary: Development files for Moira client library | 
|---|
| 198 | Group: Development/Libraries | 
|---|
| 199 | Requires: libmrclient0 = %{version}-%{release}, libmoira-devel = %{version}-%{release} | 
|---|
| 200 | %description -n libmrclient-devel | 
|---|
| 201 | Moira is the Athena Service Management system.  It serves as the | 
|---|
| 202 | central repository for information about users, groups hosts, print | 
|---|
| 203 | queues, and several other aspects of the Athena environment. | 
|---|
| 204 |  | 
|---|
| 205 | This package contains headers and static libraries for development. | 
|---|
| 206 |  | 
|---|
| 207 | %post -n libmrclient-devel -p /sbin/ldconfig | 
|---|
| 208 | %postun -n libmrclient-devel -p /sbin/ldconfig | 
|---|
| 209 |  | 
|---|
| 210 | %files -n libmrclient-devel | 
|---|
| 211 | %defattr(-,root,root) | 
|---|
| 212 | %{_includedir}/moira/mrclient.h | 
|---|
| 213 | %{_libdir}/libmrclient.so | 
|---|
| 214 | %{_libdir}/libmrclient.la | 
|---|
| 215 | %{_libdir}/libmrclient.a | 
|---|
| 216 |  | 
|---|
| 217 | %changelog | 
|---|
| 218 | * Thu Apr 08 2010 Mitchell Berger <mitchb@mit.edu> - 4.0.0-6.1534.svn20100405 | 
|---|
| 219 | - Update to new original upstream version (svn snapshot) | 
|---|
| 220 |  | 
|---|
| 221 | * Thu Feb 25 2010 Mitchell Berger <mitchb@mit.edu> - 4.0.0-5.1490.svn20100225 | 
|---|
| 222 | - Update to new original upstream version (svn snapshot) | 
|---|
| 223 |  | 
|---|
| 224 | * Thu Feb 25 2010 Mitchell Berger <mitchb@mit.edu> - 4.0.0-4.1489M.svn20100223 | 
|---|
| 225 | - Update to new original upstream version (svn snapshot) | 
|---|
| 226 | - Drop install-headers patch which was incorporated upstream (from Debathena) | 
|---|
| 227 |  | 
|---|
| 228 | * Tue Jan 05 2010 Mitchell Berger <mitchb@mit.edu> - 4.0.0-3.1405M.svn20100104 | 
|---|
| 229 | - Update to new original upstream version (svn snapshot) | 
|---|
| 230 | - Build and install libmrclient as a shared library (from Debathena) | 
|---|
| 231 |  | 
|---|
| 232 | * Mon Dec 28 2009 Mitchell Berger <mitchb@mit.edu> - 4.0.0-2.1402.cvs20091228 | 
|---|
| 233 | - Update to new upstream version, including eunice printer client | 
|---|
| 234 |  | 
|---|
| 235 | * Sat Dec 26 2009 Greg Brockman <gdb@mit.edu> - 4.0.0-2.1380.cvs20091116 | 
|---|
| 236 | - Initial packaging of Moira on Fedora | 
|---|