packages: dmenu/dmenu.spec (NEW) - initial
Przemyslaw Iskra
sparky at pld-linux.org
Sun May 31 19:04:13 CEST 2009
On Sun, May 31, 2009 at 06:45:28PM +0200, uzsolt wrote:
> Author: uzsolt Date: Sun May 31 16:45:28 2009 GMT
> Module: packages Tag: HEAD
> ---- Log message:
> - initial
> +%prep
> +%setup -q
> +sed -i "s@^PREFIX.*@PREFIX=%{_prefix}@" config.mk
> +sed -i "s@^\(CFLAGS.*\)-Os\(.*\)@\1 \2 %{rpmcflags}@" config.mk
> +sed -i "s@^\(LDFLAGS.*\)@\1 %{rpmldflags}@" config.mk
You shouldn't be defining these at %prep stage, doing so in %build is
much more secure. And there must be much a simpler way than using sed
to do it. You could pass options in %__make invocation, or append them
at the end of config.mk file:
%build
cat << 'EOF' >> config.mk
PREFIX = %{_prefix}
CFLAGS := %{rpmcflags} $(filter-out -Os,$(CFLAGS))
LDFLAGS = %{rpmldflags}
EOF
%{__make}
BTW, appropriate sed BR is missing.
--
____ Sparky{PI] -- Przemyslaw _ ___ _ _ ........... LANG...Pl..Ca..Es..En
/____) ___ ___ _ _ || Iskra | | _ \| | | : WWW........ppcrcd.pld-linux.org
\____\| -_)'___| ||^'||//\\// < | _/| | | : JID......sparky<at>jabberes.org
(____/|| (_-_|_|| ||\\ || |_ |_| |_| _| : Mail....sparky<at>pld-linux.org
More information about the pld-devel-en
mailing list