packages: wmname/wmname.spec - added minimal Makefile to prevent stripping ...
sparky
sparky at pld-linux.org
Sat Jan 16 17:55:36 CET 2010
Author: sparky Date: Sat Jan 16 16:55:36 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- added minimal Makefile to prevent stripping and allow using rpm*flags
---- Files affected:
packages/wmname:
wmname.spec (1.1 -> 1.2)
---- Diffs:
================================================================
Index: packages/wmname/wmname.spec
diff -u packages/wmname/wmname.spec:1.1 packages/wmname/wmname.spec:1.2
--- packages/wmname/wmname.spec:1.1 Sat Jan 16 17:23:07 2010
+++ packages/wmname/wmname.spec Sat Jan 16 17:55:31 2010
@@ -9,29 +9,49 @@
# Source0-md5: 6903d299f84d335e529fbd2c1d6e49fe
URL: http://www.suckless.org/programs/wmname.html
BuildRequires: xorg-lib-libX11-devel
-BuildRequires: xorg-proto-xproto-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
wmname prints/sets the window manager name property of the root window
-similar to how hostname(1) behaves. wmname is a nice utility to fix
+similar to how hostname behaves. wmname is a nice utility to fix
problems with JDK versions and other broken programs assuming a
reparenting window manager for instance.
%prep
%setup -q
+cat > Makefile <<'EOF'
+NAME = wmname
+OBJS = $(NAME).o
+LIBS = -lX11
+LD = $(CC)
+
+CPPFLAGS = -DVERSION=\"%{version}\" $(OPTCPPFLAGS)
+# vim: "
+CFLAGS = -std=c99 -pedantic -Wall $(OPTCFLAGS)
+
+all: $(NAME)
+
+$(NAME): $(OBJS)
+ $(LD) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
+
+%.o: %.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+
+.PHONY: all
+EOF
%build
%{__make} \
- PREFIX=%{_prefix} \
- CFLAGS="%{rpmcflags} -DVERSION='\"%{version}\"'"
+ CC="%{__cc}" \
+ OPTCPPFLAGS="%{rpmcppflags}" \
+ OPTCFLAGS="%{rpmcflags}" \
+ LDFLAGS="%{rpmldflags}"
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_bindir}
-%{__make} install \
- PREFIX=%{_prefix} \
- DESTDIR=$RPM_BUILD_ROOT
+install %{name} $RPM_BUILD_ROOT%{_bindir}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -39,14 +59,16 @@
%files
%defattr(644,root,root,755)
%doc README
-%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_bindir}/%{name}
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.2 2010/01/16 16:55:31 sparky
+- added minimal Makefile to prevent stripping and allow using rpm*flags
+
Revision 1.1 2010/01/16 16:23:07 uzsolt
- initial
- fix awesome vs. java (see http://awesome.naquadah.org/wiki/Problems_with_Java#Impersonate_Another_Window_Manager )
-
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/wmname/wmname.spec?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list