File klsu.spec of Package klsu

Name: klsu
Version: 0.1
Release: 0
License: MIT
PreReq: permissions
BuildRequires: krb5-devel
Requires: krb5
Source: %{name}.tar.gz
Summary: Simple ticket based group su tool

%description
Simple ticket based group su tool, allows root access to anyone with a valid ticket

%prep
%setup -q -n %{name}

%build

if cc -fstack-protector-strong -E - </dev/null >/dev/null; then
  STACK_PROT_FLAG=-fstack-protector-strong
elif cc -fstack-protector -E - </dev/null >/dev/null; then
  STACK_PROT_FLAG='-fstack-protector --param ssp-buffer-size=4'
fi

%__make CFLAGS="$RPM_OPT_FLAGS -pedantic -O3 -fPIE $STACK_PROT_FLAG -D_FORTIFY_SOURCE=2" \
        LDFLAGS='-pie -Wl,-z,now'

%install
mkdir -p $RPM_BUILD_ROOT/usr/bin
install klsu $RPM_BUILD_ROOT/usr/bin/klsu

%verifyscript
%verify_permissions -e /usr/bin/klsu

%post
%set_permissions /usr/bin/klsu

%files
%defattr(-,root,root)
%attr(4755,root,root) /usr/bin/klsu


%changelog
openSUSE Build Service is sponsored by