public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ejabberd] f45: Fix unversioned docdir
@ 2026-09-23 19:07 Peter Lemenkov
  0 siblings, 0 replies; only message in thread
From: Peter Lemenkov @ 2026-09-23 19:07 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/ejabberd
            Branch : f45
            Commit : 10a804117ea548b153705360eb20d2411a0d98a4
            Author : Peter Lemenkov <lemenkov@gmail.com>
            Date   : 2013-09-15T19:05:53+04:00
            Stats  : +39/-38 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/ejabberd/c/10a804117ea548b153705360eb20d2411a0d98a4?branch=f45

            Log:
            Fix unversioned docdir

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>

---
diff --git a/ejabberd.spec b/ejabberd.spec
index 6409cca..f451716 100644
--- a/ejabberd.spec
+++ b/ejabberd.spec
@@ -15,14 +15,15 @@
 # see https://bugzilla.redhat.com/bugzilla/250253
 %global with_hevea 0
 %else
-%global with_hevea 1
+# Hevea is deadly broken currently
+%global with_hevea 0
 %endif
 %endif
 
 
 Name:           ejabberd
 Version:        2.1.13
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        A distributed, fault-tolerant Jabber/XMPP server
 
 Group:          Applications/Internet
@@ -82,6 +83,10 @@ Requires(post): /sbin/chkconfig
 Requires(preun): /sbin/chkconfig
 Requires(preun): /sbin/service
 Requires(postun): /sbin/service
+%else
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
 %endif
 
 Provides: user(%{name}) = %{uid}
@@ -132,7 +137,7 @@ Windows NT/2000/XP).
 
 %package doc
 Summary: Documentation for ejabberd
-%if 0%{?el6}%{?fedora}
+%if 0%{?el6}%{?el7}%{?fedora}
 BuildArch: noarch
 Obsoletes: %{name}-doc < 2.1.4
 %endif
@@ -199,15 +204,15 @@ sed -i -e "s,password-auth,system-auth,g" %{buildroot}%{_sysconfdir}/pam.d/ejabb
 %endif
 
 
-%if 0%{?fedora} > 14
-# install systemd entry
-install -D -m 0644 -p %{S:4} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
-install -D -m 0644 -p %{S:5} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/%{name}.conf
-%else
+%if 0%{?el5}%{?el6}
 # install init-script
 install -D -p -m 0755 %{S:1} %{buildroot}%{_initrddir}/ejabberd
 # install sysconfig file
 install -D -p -m 0644  %{S:3} %{buildroot}%{_sysconfdir}/sysconfig/ejabberd
+%else
+# install systemd entry
+install -D -m 0644 -p %{S:4} %{buildroot}%{_unitdir}/%{name}.service
+install -D -m 0644 -p %{S:5} %{buildroot}%{_tmpfilesdir}/%{name}.conf
 %endif
 
 # install config for logrotate
@@ -230,6 +235,10 @@ chmod 755 %{buildroot}%{_sbindir}/ejabberdctl
 # for this *default* sript, which is not intended to be changed
 chmod 755 %{buildroot}%{_libdir}/%{name}/priv/bin/captcha.sh
 
+# Remove installed doc-files
+rm -rf %{buildroot}%{_defaultdocdir}
+
+
 %pre
 %{__fe_groupadd} %{uid} -r %{name} &>/dev/null || :
 %{__fe_useradd} %{uid} -r -s /sbin/nologin -d /var/lib/ejabberd -M \
@@ -267,16 +276,13 @@ fi
 
 
 %post
-%if 0%{?fedora} > 14
-if [ $1 -eq 1 ] ; then
-	# Initial installation
-	/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
-%else
+%if 0%{?el5}%{?el6}
 if [ $1 -eq 1 ]; then
 	# Initial installation
 	/sbin/chkconfig --add %{name} || :
 fi
+%else
+%systemd_post %{name}.service
 %endif
 
 # Create SSL certificate with default values if it doesn't exist
@@ -302,33 +308,25 @@ fi)
 
 
 %preun
-%if 0%{?fedora} > 14
-if [ $1 -eq 0 ] ; then
-	# Package removal, not upgrade
-	/bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
-	/bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
-fi
-%else
+%if 0%{?el5}%{?el6}
 if [ $1 -eq 0 ]; then
 	# Package removal, not upgrade
         /sbin/service %{name} stop >/dev/null 2>&1 || :
         /sbin/chkconfig --del %{name} || :
 fi
+%else
+%systemd_preun %{name}.service
 %endif
 
 
 %postun
-%if 0%{?fedora} > 14
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-	# Package upgrade, not uninstall
-	/bin/systemctl condrestart %{name}.service >/dev/null 2>&1 || :
-fi
-%else
+%if 0%{?el5}%{?el6}
 if [ $1 -ge 1 ]; then
 	# Package upgrade, not uninstall
 	/sbin/service %{name} condrestart >/dev/null 2>&1
 fi
+%else
+%systemd_postun_with_restart %{name}.service
 %endif
 
 
@@ -337,20 +335,19 @@ rm -rf %{buildroot}
 
 
 %files
-%dir %{_docdir}/%{name}-%{version}
-%doc %{_docdir}/%{name}-%{version}/COPYING
+%doc COPYING
 
 %attr(750,ejabberd,ejabberd) %dir %{_sysconfdir}/ejabberd
 %attr(640,ejabberd,ejabberd) %config(noreplace) %{_sysconfdir}/ejabberd/ejabberd.cfg
 %attr(640,ejabberd,ejabberd) %config(noreplace) %{_sysconfdir}/ejabberd/ejabberdctl.cfg
 %attr(640,ejabberd,ejabberd) %config(noreplace) %{_sysconfdir}/ejabberd/inetrc
 
-%if 0%{?fedora} > 14
-%{_unitdir}/%{name}.service
-%{_sysconfdir}/tmpfiles.d/%{name}.conf
-%else
+%if 0%{?el5}%{?el6}
 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
 %{_initrddir}/%{name}
+%else
+%{_unitdir}/%{name}.service
+%{_tmpfilesdir}/%{name}.conf
 %endif
 
 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
@@ -415,15 +412,19 @@ rm -rf %{buildroot}
 %attr(750,ejabberd,ejabberd) %dir /var/log/ejabberd
 
 %files doc
-%doc %{_docdir}/%{name}-%{version}/*.html
-%doc %{_docdir}/%{name}-%{version}/*.png
+%doc doc/*.html
+%doc doc/*.png
 %if 0%{?with_hevea}
-%doc %{_docdir}/%{name}-%{version}/*.pdf
+%doc doc/*.pdf
 %endif
-%doc %{_docdir}/%{name}-%{version}/*.txt
+%doc doc/*.txt
 
 
 %changelog
+* Thu Sep 05 2013 Peter Lemenkov <lemenkov@gmail.com> - 2.1.13-3
+- TEMPORARY disable hevea - it's broken in F19+
+- Fix building with unversioned docdir
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.13-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-23 19:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 19:07 [rpms/ejabberd] f45: Fix unversioned docdir Peter Lemenkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox