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