| 1 | Name:           zephyr | 
|---|
| 2 | Version:        3.1.2 | 
|---|
| 3 | %define commit 54c6b84a81301a1691f9bec10c63c1e36166df9d | 
|---|
| 4 | %define shortcommit %(c=%{commit}; echo ${c:0:7}) | 
|---|
| 5 | Release:        0.%{scriptsversion}%{?dist} | 
|---|
| 6 | Summary:        Client programs for the Zephyr real-time messaging system | 
|---|
| 7 |  | 
|---|
| 8 | Group:          Applications/Communications | 
|---|
| 9 | License:        MIT | 
|---|
| 10 | URL:            http://zephyr.1ts.org/ | 
|---|
| 11 | Source0:        https://github.com/zephyr-im/zephyr/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz | 
|---|
| 12 | Source1:        zhm.init | 
|---|
| 13 | BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | 
|---|
| 14 |  | 
|---|
| 15 | BuildRequires:  krb5-devel hesiod-devel libss-devel libcom_err-devel readline-devel bison | 
|---|
| 16 | Requires:       %{name}-libs = %{version}-%{release} | 
|---|
| 17 | Requires(post): chkconfig | 
|---|
| 18 | Requires(preun): chkconfig | 
|---|
| 19 | Requires(preun): initscripts | 
|---|
| 20 | Requires(postun): initscripts | 
|---|
| 21 |  | 
|---|
| 22 | %description | 
|---|
| 23 | Zephyr is an institutional/enterprise-scale distributed real-time messaging and | 
|---|
| 24 | notification system.  Zephyr's design choices seem to imbue it with a specific | 
|---|
| 25 | culture.  It is impossible to explain what Zephyr is, you must experience it | 
|---|
| 26 | for yourself. | 
|---|
| 27 |  | 
|---|
| 28 |  | 
|---|
| 29 | %package        server | 
|---|
| 30 | Summary:        Server for the Zephyr real-time messaging system | 
|---|
| 31 | Group:          System Environment/Daemons | 
|---|
| 32 |  | 
|---|
| 33 | Requires:       %{name}-libs = %{version}-%{release} | 
|---|
| 34 |  | 
|---|
| 35 | %description    server | 
|---|
| 36 | The %{name}-server package contains the server daemon for the Zephyr | 
|---|
| 37 | messaging service.  It maintains a location and subscription database | 
|---|
| 38 | for all the receiving clients, and routes all zephyrgrams to the | 
|---|
| 39 | intended recipients. | 
|---|
| 40 |  | 
|---|
| 41 |  | 
|---|
| 42 | %package        libs | 
|---|
| 43 | Summary:        Shared libraries for Zephyr real-time messaging system | 
|---|
| 44 | Group:          System Environment/Libraries | 
|---|
| 45 |  | 
|---|
| 46 | %description    libs | 
|---|
| 47 | The %{name}-libs package contains shared libraries for applications | 
|---|
| 48 | that use %{name}. | 
|---|
| 49 |  | 
|---|
| 50 |  | 
|---|
| 51 | %package        devel | 
|---|
| 52 | Summary:        Development files for Zephyr real-time messaging system | 
|---|
| 53 | Group:          Development/Libraries | 
|---|
| 54 |  | 
|---|
| 55 | Requires:       %{name}-libs = %{version}-%{release}, libcom_err-devel | 
|---|
| 56 |  | 
|---|
| 57 | %description    devel | 
|---|
| 58 | The %{name}-devel package contains libraries and header files for | 
|---|
| 59 | developing applications that use %{name}. | 
|---|
| 60 |  | 
|---|
| 61 |  | 
|---|
| 62 | %prep | 
|---|
| 63 | %setup -q -n %{name}-%{commit} | 
|---|
| 64 | cp -p %{SOURCE1} . | 
|---|
| 65 |  | 
|---|
| 66 |  | 
|---|
| 67 | %build | 
|---|
| 68 | # Mitch wants to make an awesome specfile which makes hesiod/krb5 and friends | 
|---|
| 69 | # all fully configurable.  This configure line will have to do for now. | 
|---|
| 70 | %configure --with-hesiod --with-krb5 --disable-static | 
|---|
| 71 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool | 
|---|
| 72 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool | 
|---|
| 73 | make %{?_smp_mflags} | 
|---|
| 74 |  | 
|---|
| 75 | %install | 
|---|
| 76 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 77 | make install DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} | 
|---|
| 78 | find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' | 
|---|
| 79 |  | 
|---|
| 80 | mkdir -p $RPM_BUILD_ROOT%{_initddir} | 
|---|
| 81 | install -m755 zhm.init \ | 
|---|
| 82 | $RPM_BUILD_ROOT%{_initddir}/zhm | 
|---|
| 83 | # Make RPM's Provide: searcher actually search the .so files! A recent | 
|---|
| 84 | # change in how RPM detects Provides automatically means that only | 
|---|
| 85 | # files that are executable get searched. Without this hack, all of | 
|---|
| 86 | # the zephyr client tools are Requires: libzephyr.so.4 which is never | 
|---|
| 87 | # Provides:, leading to uninstallable RPMS. This can be removed when | 
|---|
| 88 | # zephyr starts installing the libraries with mode 755 rather than | 
|---|
| 89 | # 644. (Zephyr #79) | 
|---|
| 90 | chmod a+x $RPM_BUILD_ROOT%{_libdir}/libzephyr.so.* | 
|---|
| 91 |  | 
|---|
| 92 | %post | 
|---|
| 93 | /sbin/chkconfig --add zhm | 
|---|
| 94 |  | 
|---|
| 95 |  | 
|---|
| 96 | %preun | 
|---|
| 97 | if [ $1 = 0 ] ; then | 
|---|
| 98 | /sbin/service zhm stop >/dev/null 2>&1 | 
|---|
| 99 | /sbin/chkconfig --del zhm | 
|---|
| 100 | fi | 
|---|
| 101 |  | 
|---|
| 102 |  | 
|---|
| 103 | %postun | 
|---|
| 104 | if [ "$1" -ge "1" ] ; then | 
|---|
| 105 | /sbin/service zhm condrestart >/dev/null 2>&1 || : | 
|---|
| 106 | fi | 
|---|
| 107 |  | 
|---|
| 108 |  | 
|---|
| 109 | %post           libs -p /sbin/ldconfig | 
|---|
| 110 |  | 
|---|
| 111 | %postun         libs -p /sbin/ldconfig | 
|---|
| 112 |  | 
|---|
| 113 |  | 
|---|
| 114 | %clean | 
|---|
| 115 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 116 |  | 
|---|
| 117 |  | 
|---|
| 118 | %files | 
|---|
| 119 | %defattr(-,root,root,-) | 
|---|
| 120 | %doc README USING | 
|---|
| 121 | %{_bindir}/* | 
|---|
| 122 | %{_sbindir}/zhm | 
|---|
| 123 | %{_sbindir}/zshutdown_notify | 
|---|
| 124 | %{_mandir}/man1/* | 
|---|
| 125 | %{_mandir}/man8/zhm.8* | 
|---|
| 126 | %{_mandir}/man8/zstat.8* | 
|---|
| 127 | %{_mandir}/man8/zshutdown_notify.8* | 
|---|
| 128 | %{_datadir}/zephyr | 
|---|
| 129 | %{_initddir}/zhm | 
|---|
| 130 |  | 
|---|
| 131 |  | 
|---|
| 132 | %files          server | 
|---|
| 133 | %doc OPERATING | 
|---|
| 134 | %{_sysconfdir}/zephyr | 
|---|
| 135 | %{_sbindir}/zephyrd | 
|---|
| 136 | %{_mandir}/man8/zephyrd.8* | 
|---|
| 137 |  | 
|---|
| 138 |  | 
|---|
| 139 | %files          libs | 
|---|
| 140 | %{_libdir}/*.so.* | 
|---|
| 141 |  | 
|---|
| 142 |  | 
|---|
| 143 | %files          devel | 
|---|
| 144 | %{_libdir}/*.so | 
|---|
| 145 | %{_includedir}/* | 
|---|
| 146 | %{_libdir}/pkgconfig/zephyr.pc | 
|---|
| 147 |  | 
|---|
| 148 | %changelog | 
|---|
| 149 | * Mon May 26 2014 Alexander Chernyakhovsky <achernya@mit.edu> - 3.1.2-0 | 
|---|
| 150 | - Update to Zephyr 3.1.2, fix packaging for F20 | 
|---|
| 151 |  | 
|---|
| 152 | * Sat Apr 16 2011 Alexander Chernyakhovsky <achernya@mit.edu> 3.0.1-0 | 
|---|
| 153 | - Zephyr 3.0.1 | 
|---|
| 154 |  | 
|---|
| 155 | * Sun Sep 19 2010 Anders Kaseorg <andersk@mit.edu> - 3.0-0 | 
|---|
| 156 | - Decrease version below a hypothetical Fedora package. | 
|---|
| 157 | - Split out -server, -libs, and -devel into subpackages. | 
|---|
| 158 | - Disable the static library and remove the libtool archive. | 
|---|
| 159 |  | 
|---|
| 160 | * Thu Sep 09 2010 Edward Z. Yang <ezyang@mit.edu> 3.0-1 | 
|---|
| 161 | - Initial packaging release, superseding mit-zephyr. | 
|---|