Group :: Sistema/Bibliotecas
RPM: libnoch
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Name: libnoch
Version: 0.4
Release: alt1
Summary: Stab wrappers for chmod and chown calls
License: GPL
Group: System/Libraries
Source0: noch.c
Source1: chtest.c
%description
Stab wrappers for *chmod and *chown calls.
%prep
%setup -qcT
%__install -pm644 %SOURCE0 %SOURCE1 .
%build
readelf -Ws /%_lib/libc.so.6 | awk '
$4 == "FUNC" && $6 == "DEFAULT" && $8 ~ / at at / {
sym=$8;
name=gensub(" at at .*", "", 1, sym);
vers=gensub("^[^ at ]* at at ", "", 1, sym);
printf("#define %s_vers \"%s\"\n", name, vers);
}' >vers.h
gcc $RPM_OPT_FLAGS %optflags_shared noch.c -ldl -shared -o libnoch.so
gcc $RPM_OPT_FLAGS chtest.c -o chtest
LD_PRELOAD=./libnoch.so ./chtest
%install
%__mkdir_p $RPM_BUILD_ROOT%_libdir
%__install -pm755 libnoch.so $RPM_BUILD_ROOT%_libdir/
%files
%_libdir/*
%changelog
…
Todas as alterações você pod ver aqui
Version: 0.4
Release: alt1
Summary: Stab wrappers for chmod and chown calls
License: GPL
Group: System/Libraries
Source0: noch.c
Source1: chtest.c
%description
Stab wrappers for *chmod and *chown calls.
%prep
%setup -qcT
%__install -pm644 %SOURCE0 %SOURCE1 .
%build
readelf -Ws /%_lib/libc.so.6 | awk '
$4 == "FUNC" && $6 == "DEFAULT" && $8 ~ / at at / {
sym=$8;
name=gensub(" at at .*", "", 1, sym);
vers=gensub("^[^ at ]* at at ", "", 1, sym);
printf("#define %s_vers \"%s\"\n", name, vers);
}' >vers.h
gcc $RPM_OPT_FLAGS %optflags_shared noch.c -ldl -shared -o libnoch.so
gcc $RPM_OPT_FLAGS chtest.c -o chtest
LD_PRELOAD=./libnoch.so ./chtest
%install
%__mkdir_p $RPM_BUILD_ROOT%_libdir
%__install -pm755 libnoch.so $RPM_BUILD_ROOT%_libdir/
%files
%_libdir/*
%changelog
…
Todas as alterações você pod ver aqui