source: branches/fc20-dev/server/fedora/specs/zephyr.spec @ 2559

Last change on this file since 2559 was 2525, checked in by achernya, 11 years ago
Modernize spec files for F20
File size: 4.6 KB
Line 
1Name:           zephyr
2Version:        3.1.2
3%define commit 54c6b84a81301a1691f9bec10c63c1e36166df9d
4%define shortcommit %(c=%{commit}; echo ${c:0:7})
5Release:        0.%{scriptsversion}%{?dist}
6Summary:        Client programs for the Zephyr real-time messaging system
7
8Group:          Applications/Communications
9License:        MIT
10URL:            http://zephyr.1ts.org/
11Source0:        https://github.com/zephyr-im/zephyr/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
12Source1:        zhm.init
13BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14
15BuildRequires:  krb5-devel hesiod-devel libss-devel libcom_err-devel readline-devel bison
16Requires:       %{name}-libs = %{version}-%{release}
17Requires(post): chkconfig
18Requires(preun): chkconfig
19Requires(preun): initscripts
20Requires(postun): initscripts
21
22%description
23Zephyr is an institutional/enterprise-scale distributed real-time messaging and
24notification system.  Zephyr's design choices seem to imbue it with a specific
25culture.  It is impossible to explain what Zephyr is, you must experience it
26for yourself.
27
28
29%package        server
30Summary:        Server for the Zephyr real-time messaging system
31Group:          System Environment/Daemons
32
33Requires:       %{name}-libs = %{version}-%{release}
34
35%description    server
36The %{name}-server package contains the server daemon for the Zephyr
37messaging service.  It maintains a location and subscription database
38for all the receiving clients, and routes all zephyrgrams to the
39intended recipients.
40
41
42%package        libs
43Summary:        Shared libraries for Zephyr real-time messaging system
44Group:          System Environment/Libraries
45
46%description    libs
47The %{name}-libs package contains shared libraries for applications
48that use %{name}.
49
50
51%package        devel
52Summary:        Development files for Zephyr real-time messaging system
53Group:          Development/Libraries
54
55Requires:       %{name}-libs = %{version}-%{release}, libcom_err-devel
56
57%description    devel
58The %{name}-devel package contains libraries and header files for
59developing applications that use %{name}.
60
61
62%prep
63%setup -q -n %{name}-%{commit}
64cp -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
71sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
72sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
73make %{?_smp_mflags}
74
75%install
76rm -rf $RPM_BUILD_ROOT
77make install DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir}
78find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
79
80mkdir -p $RPM_BUILD_ROOT%{_initddir}
81install -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)
90chmod a+x $RPM_BUILD_ROOT%{_libdir}/libzephyr.so.*
91
92%post
93/sbin/chkconfig --add zhm
94
95
96%preun
97if [ $1 = 0 ] ; then
98    /sbin/service zhm stop >/dev/null 2>&1
99    /sbin/chkconfig --del zhm
100fi
101
102
103%postun
104if [ "$1" -ge "1" ] ; then
105    /sbin/service zhm condrestart >/dev/null 2>&1 || :
106fi
107
108
109%post           libs -p /sbin/ldconfig
110
111%postun         libs -p /sbin/ldconfig
112
113
114%clean
115rm -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.
Note: See TracBrowser for help on using the repository browser.