2 KERNELDIR ?
= /lib
/modules
/$(shell uname
-r
)/build
3 KVERREL
= $(patsubst /lib
/modules
/%/build
,%,$(KERNELDIR
))
7 INSTALLDIR
= $(patsubst %/build
,%/extra
,$(KERNELDIR
))
12 $(MAKE
) -C
$(KERNELDIR
) M
=`pwd` "$$@"
15 mkdir
-p
$(DESTDIR
)/$(INSTALLDIR
)
16 cp
*.ko
$(DESTDIR
)/$(INSTALLDIR
)
19 tmpspec
= .tmp.kvm-kmod.spec
20 RPMDIR
= $$(pwd
)/..
/RPMS
22 mkdir
-p ..
/BUILD
$(RPMDIR
)/$$(uname
-m
)
23 sed
's/^Release:.*/Release: $(rpmrelease)/' kvm-kmod.spec
> $(tmpspec
)
24 rpmbuild
--define="kverrel $(KVERREL)" \
25 --define="objdir $$(pwd)" \
26 --define="_rpmdir $(RPMDIR)" \
27 --define="_topdir $$(pwd)/.." \
31 $(MAKE
) -C
$(KERNELDIR
) M
=`pwd` $@
34 svn st | grep
'^\?' | awk
'{print $2}' | xargs
rm -rf