Name: desh Version: 1.3.0 Release: 34%{?dist} Summary: An experimental shell Group: System Environment/Shells License: BSD URL: https://github.com/injinj/%{name} Source0: %{name}-%{version}-34.tar.gz BuildRoot: ${_tmppath} Prefix: /usr BuildRequires: gcc-c++ BuildRequires: chrpath BuildRequires: byacc BuildRequires: linecook BuildRequires: libdecnumber BuildRequires: pcre2-devel Requires: pcre2 Requires: linecook Requires: libdecnumber Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig %description An experimental shell derived from es and rc. %prep %setup -q %define _unpackaged_files_terminate_build 0 %define _missing_doc_files_terminate_build 0 %define _missing_build_ids_terminate_build 0 %define _include_gdb_index 1 %build make build_dir=./usr %{?_smp_mflags} dist_bins cp -a ./include ./usr/include mkdir -p ./etc cp -a script/deshrc ./etc/deshrc mkdir -p ./%{_mandir}/man1 cp -a doc/es.1 ./%{_mandir}/man1/desh.1 %install rm -rf %{buildroot} mkdir -p %{buildroot} # in builddir cp -a * %{buildroot} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) /usr/bin/* /usr/lib64/* /usr/include/* %doc README.md doc/CHANGES doc/es.1 script/deshrc script/esrc.haahr %config /etc/deshrc %{_mandir}/man1/desh.1.gz %post echo "${RPM_INSTALL_PREFIX}/lib64" > /etc/ld.so.conf.d/desh.conf if [ $1 -eq 1 ] ; then if [ ! -f %{_sysconfdir}/shells ] ; then echo "%{_bindir}/desh" > %{_sysconfdir}/shells echo "${RPM_INSTALL_PREFIX}/bin/desh" >> %{_sysconfdir}/shells else grep -q "^%{_bindir}/desh$" %{_sysconfdir}/shells || echo "%{_bindir}/desh" >> %{_sysconfdir}/shells grep -q "^${RPM_INSTALL_PREFIX}/bin/desh$" %{_sysconfdir}/shells || echo "${RPM_INSTALL_PREFIX}/bin/desh" >> %{_sysconfdir}/shells fi fi /sbin/ldconfig %postun # if uninstalling if [ $1 -eq 0 ] ; then rm -f /etc/ld.so.conf.d/desh.conf sed -i '\!^%{_bindir}/desh$!d' %{_sysconfdir}/shells sed -i '\!^${RPM_INSTALL_PREFIX}/bin/desh$!d' %{_sysconfdir}/shells fi /sbin/ldconfig %changelog * Thu Apr 27 2023 - Hello world