%global dist .el8.sw Summary: Sobi-Wan Utilities Summary(pl): Użytki Sobiego-Wana Name: sw-utils Version: 10.0 Release: 3%{?dist} Epoch: 1 License: BSD Group: Applications/System Source0: %{name}.tgz Requires: bash-completion Requires: colordiff Requires: coreutils Requires: gawk Requires: ghostscript Requires: less Requires: mc Requires: nc Requires: screen BuildRequires: cracklib-devel BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: ncurses-devel BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sysconfdir /etc/sw-utils %define _destdir /usr/local %define _swutilslog /var/log/sw-utils %description Sobi-Wan Utilities contains a set of tools usefull in daily work with system. Most of them are *sh/perl scripts. If you want - install them. But on your own responsibility! %description -l pl Użytki Sobiego-Wana zawierają zestaw narzędzi użytecznych w codziennej pracy z systemem. Większość z nich to skrypty *sh/perla. Jeśli chcesz - zainstaluj je. Oczywiście na własną odpowiedzialność! %prep %setup -q -n %{name} %build gcc -g -Wall bin/devrandom.c -o bin/devrandom gcc -g -Wall bin/rot13.c -o bin/rot13 gcc -g -Wall -lcrack bin/testpasswd.c -o bin/testpasswd gcc -g -Wall bin/up.c -o bin/up for source in bin/*.c do rm -f $source done for source in bin/*.cpp do rm -f $source done for source in sbin/*.c do rm -f $source done for source in sbin/*.cpp do rm -f $source done cd packages/bsod %{__make} \ CC="%{__cc}" \ CXX="%{__cxx}" \ CFLAGS="${RPM_OPT_FLAGS}" \ CXXFLAGS="${RPM_OPT_FLAGS}" cd ../.. cd packages/cmatrix ./configure %{__make} \ CC="%{__cc}" \ CXX="%{__cxx}" \ CFLAGS="${RPM_OPT_FLAGS}" \ CXXFLAGS="${RPM_OPT_FLAGS}" cd ../.. cd packages/swclock make cd ../.. cd packages/ts %{__make} \ CC="%{__cc}" \ CXX="%{__cxx}" \ CFLAGS="${RPM_OPT_FLAGS}" \ CXXFLAGS="${RPM_OPT_FLAGS}" cd ../.. %install install -d $RPM_BUILD_ROOT%{_destdir}/bin/ install -d $RPM_BUILD_ROOT%{_destdir}/sbin/ install -d $RPM_BUILD_ROOT%{_destdir}/share/man/man1/ install -d $RPM_BUILD_ROOT%{_destdir}/share/man/man7/ install -d $RPM_BUILD_ROOT%{_sysconfdir} install -d $RPM_BUILD_ROOT%{_swutilslog} install -D bin/* $RPM_BUILD_ROOT%{_destdir}/bin/ install -D sbin/* $RPM_BUILD_ROOT%{_destdir}/sbin/ install -D man/* $RPM_BUILD_ROOT%{_destdir}/share/man/man1/ #install -D etc/sw-utils/* $RPM_BUILD_ROOT%{_sysconfdir}/ install -D packages/bsod/bsod $RPM_BUILD_ROOT%{_destdir}/bin/ install -D packages/cmatrix/cmatrix $RPM_BUILD_ROOT%{_destdir}/bin/matrix install -D packages/cmatrix/cmatrix.1 $RPM_BUILD_ROOT%{_destdir}/share/man/man1/matrix.1 install -D packages/swclock/swclock $RPM_BUILD_ROOT%{_destdir}/bin/ install -D packages/swclock/swclock.7 $RPM_BUILD_ROOT%{_destdir}/share/man/man7/ install -D packages/ts/ts $RPM_BUILD_ROOT%{_destdir}/bin/ install -D packages/ts/ts.1 $RPM_BUILD_ROOT%{_destdir}/share/man/man1/ gzip $RPM_BUILD_ROOT%{_destdir}/share/man/man1/* gzip $RPM_BUILD_ROOT%{_destdir}/share/man/man7/* %clean rm -rf $RPM_BUILD_ROOT %pre echo This is pre for %{version}-%{release}: arg=$1 chmod u+s /usr/bin/sudo %post echo This is post for %{version}-%{release}: arg=$1 %preun echo This is preun for %{version}-%{release}: arg=$1 %postun echo This is postun for %{version}-%{release}: arg=$1 %files %defattr(644,root,root,755) %attr(755,root,root) %{_destdir}/bin/* %attr(755,root,root) %{_destdir}/sbin/* %attr(755,root,root) %{_sysconfdir} #%attr(644,root,root) %{_sysconfdir}/* %attr(644,root,root) %{_destdir}/share/man/man1/* %attr(644,root,root) %{_destdir}/share/man/man7/* %attr(700,root,root) %{_swutilslog} %doc doc/* %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)