[anyterm] No prelink on aarch64 ppc64le, Cleanup spec and update systemd scriptlets
Peter Robinson
pbrobinson at fedoraproject.org
Mon Jun 30 13:53:46 UTC 2014
commit f5731d9c420b5f3265c02f219e3d3fdc9668fe67
Author: Peter Robinson <pbrobinson at gmail.com>
Date: Mon Jun 30 14:53:46 2014 +0100
No prelink on aarch64 ppc64le, Cleanup spec and update systemd scriptlets
anyterm.spec | 70 +++++++++++++++++++++------------------------------------
1 files changed, 26 insertions(+), 44 deletions(-)
---
diff --git a/anyterm.spec b/anyterm.spec
index c5ece96..d638625 100644
--- a/anyterm.spec
+++ b/anyterm.spec
@@ -1,6 +1,6 @@
Name: anyterm
Version: 1.1.29
-Release: 22%{?dist}
+Release: 23%{?dist}
Summary: A web-based terminal emulator
Group: Applications/Internet
@@ -21,16 +21,15 @@ Patch1: anyterm-libpbe-fix.patch
# boost 1.53 compatibility
Patch2: anyterm-1.1.29-boostclassic.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: boost-devel
BuildRequires: zlib-devel
+%ifnarch aarch64 ppc64le
BuildRequires: prelink
-BuildRequires: systemd-units
-Requires(pre): shadow-utils
-Requires(post): systemd-units
-Requires(preun): systemd-units
-Requires(postun): systemd-units
-Requires(post): systemd-sysv
+%endif
+BuildRequires: systemd
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
%package httpd
@@ -61,35 +60,32 @@ cd ..
%build
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
-%{__make} %{?_smp_mflags} CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS"
-%{__gzip} anytermd.1
+make %{?_smp_mflags} CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS"
+gzip anytermd.1
+%ifnarch aarch64 ppc64le
execstack -c anytermd
+%endif
%install
-%{__rm} -rf %{buildroot}
+install -Dp -m0755 anytermd %{buildroot}%{_sbindir}/anytermd
+install -Dp -m0644 anytermd.1.gz %{buildroot}%{_mandir}/man1/anytermd.1.gz
+install -Dp -m0755 %{SOURCE1} %{buildroot}%{_libexecdir}/%{name}/anyterm-cmd
+install -Dp -m0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/httpd/conf.d/anyterm.conf
+install -Dp -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/anyterm.service
-%{__install} -Dp -m0755 anytermd %{buildroot}%{_sbindir}/anytermd
-%{__install} -Dp -m0644 anytermd.1.gz %{buildroot}%{_mandir}/man1/anytermd.1.gz
-%{__install} -Dp -m0755 %{SOURCE1} %{buildroot}%{_libexecdir}/%{name}/anyterm-cmd
-%{__install} -Dp -m0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/httpd/conf.d/anyterm.conf
-%{__install} -Dp -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/anyterm.service
-
-%{__mkdir} -p %{buildroot}%{_datadir}/anyterm/
+mkdir -p %{buildroot}%{_datadir}/anyterm/
for f in browser/*.{html,css,js,png,gif}; do
- %{__install} -m644 "$f" %{buildroot}%{_datadir}/anyterm/
+ install -m644 "$f" %{buildroot}%{_datadir}/anyterm/
done
# Create a home directory for the user.
-%{__mkdir} -p -m755 %{buildroot}%{_localstatedir}/run/%{name}
+mkdir -p -m755 %{buildroot}%{_localstatedir}/run/%{name}
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
cat <<EOF > %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
d %{_localstatedir}/run/%{name} 0755 root %{name}
EOF
-%clean
-rm -rf %{buildroot}
-
%pre
# create anyterm group / user
getent group %{name} >/dev/null 2>&1 || \
@@ -107,32 +103,15 @@ fi
exit 0
%post
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post anyterm.service
%preun
-if [ $1 -eq 0 ] ; then
- # Package removal, not upgrade
- /bin/systemctl --no-reload disable anyterm.service > /dev/null 2>&1 || :
- /bin/systemctl stop anyterm.service > /dev/null 2>&1 || :
-fi
+%systemd_preun anyterm.service
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart anyterm.service >/dev/null 2>&1 || :
-fi
-
-%triggerun -- anyterm < 1.1.29-12
-/usr/bin/systemd-sysv-convert --save anyterm >/dev/null 2>&1 ||:
-/sbin/chkconfig --del anyterm >/dev/null 2>&1 || :
-/bin/systemctl try-restart anyterm.service >/dev/null 2>&1 || :
+%systemd_postun_with_restart anyterm.service
%files
-%defattr(-,root,root,-)
%{_sbindir}/anytermd
%{_libexecdir}/anyterm/
%{_mandir}/man1/anytermd.1.gz
@@ -143,10 +122,13 @@ fi
%doc LICENSE
%files httpd
-%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/httpd/conf.d/anyterm.conf
%changelog
+* Mon Jun 30 2014 Peter Robinson <pbrobinson at fedoraproject.org> 1.1.29-23
+- No prelink on aarch64 ppc64le
+- Cleanup spec and update systemd scriptlets
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.29-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list