GARNAME = linux mainversion = 3.3 patchversion = .4 preversion = rtversion = bfsversion = distversion = $(mainversion) GARVERSION = $(mainversion)$(patchversion)$(preversion)$(rtversion)$(bfsversion) GARREVISION = config$(shell sha1sum $(FILEDIR)/config | awk '{print $$1}') CATEGORIES = linux MASTER_SITES = $(MASTER_KERNEL) MASTER_SUBDIR = linux/kernel/v3.0/$(if $(preversion),testing/) SIGFILE_SITES = $(PATCHFILE_SITES) PATCHFILE_SITES = \ $(addsuffix linux/kernel/projects/rt/older/,$(MASTER_KERNEL)) \ $(addsuffix linux/kernel/projects/rt/,$(MASTER_KERNEL)) \ http://ck.kolivas.org/patches/bfs/$(distversion).0/ mainname = linux-$(distversion)$(preversion).tar.bz2 DISTFILES = $(mainname) config SIGFILES = $(patsubst %.bz2.sign,%.sign,$(mainname).sign $(if $(patchversion),$(patchname).sign)) $(if $(rtversion),$(rtname).sign) patchname = $(if $(patchversion),patch-$(distversion)$(preversion)$(patchversion).bz2) rtname = $(if $(rtversion),patch-$(distversion)$(preversion)$(patchversion)$(rtversion).bz2) bfsname = $(if $(bfsversion),$(distversion)-sched-bfs-$(subst -bfs,,$(bfsversion)).patch) gspatches = PATCHFILES = $(patchname) $(rtname) $(bfsname) $(gspatches) PATCHOPTS = -p1 LIBDEPS = sys/newt python/python WORKSRC = $(WORKDIR)/linux-$(distversion)$(preversion) DESCRIPTION = The Linux kernel HOME_URL = http://www.kernel.org/ # For the patches: # http://rt.wiki.kernel.org/index.php/CONFIG_PREEMPT_RT_Patch # http://ck.kolivas.org/patches/bfs/ CONFIGURE_SCRIPTS = scmversion config BUILD_SCRIPTS = \ $(WORKSRC)/Makefile \ $(WORKSRC)/tools/perf/Makefile INSTALL_SCRIPTS = \ kernel source docs hook-post-install \ $(WORKSRC)/tools/perf/Makefile-DESTDIR MAKE_ARGS = \ prefix=$(prefix) \ sysconfdir=$(sysconfdir) BUILD_ARGS = \ $(MAKE_ARGS_PARALLEL) \ all dest = $(packageprefix)/src/linux moddir = $(packageDESTDIR)/lib/modules/$(GARVERSION) include ../linux.mk COLLISIONS += include/.install* include/..install* include/drm DECONFLICT += libdrm patch-clearev: @sed -i 's,\(EXTRAVERSION =\).*,\1,' $(WORKSRC)/Makefile $(MAKECOOKIE) # Post-3.0, this doesn't include patchversion any more. post-patch: @sed -i 's,\(EXTRAVERSION =\).*,\1 $(preversion)$(rtversion)$(bfsversion),' $(WORKSRC)/Makefile $(MAKECOOKIE) # If this file isn't present, scripts/setlocalversion will try to figure out # whether it's building the source from several different version control # systems -- and it'll find the GARstow working copy by walking up the tree. configure-scmversion: @touch $(WORKSRC)/.scmversion $(MAKECOOKIE) configure-config: @cp $(FILEDIR)/config $(WORKSRC)/.config @yes '' | make -C $(WORKSRC) oldconfig $(MAKECOOKIE) # This rule should be invoked by hand after a version upgrade in order to # update the config file contained in this port. config_target ?= oldconfig config: @sed -i \ -e 's,\t\(for ext in so a\),\techo "-lncurses"; \1,' \ -e 's,/usr/include,$(prefix)/include,g' \ $(WORKSRC)/scripts/kconfig/lxdialog/check-lxdialog.sh @cp $(FILEDIR)/config $(WORKSRC)/.config @make -C $(WORKSRC) $(config_target) @cp $(WORKSRC)/.config $(FILEDIR)/config @make makesum install-kernel: @install -m755 $(WORKSRC)/arch/i386/boot/bzImage $(packageDESTDIR)$(bootdir)/vmlinuz-$(GARVERSION) @make -C $(WORKSRC) \ headers_install modules_install firmware_install \ INSTALL_MOD_PATH=$(packageDESTDIR) \ INSTALL_HDR_PATH=$(packageprefix) $(MAKECOOKIE) install-source: @mkdir -p $(dest) @rm -rf $(dest) @cp -R $(WORKSRC) $(dest) @make -C $(dest) clean @make -C $(dest) prepare @rm -f $(moddir)/build $(moddir)/source @ln -sf $(prefix)/src/linux $(moddir)/build @ln -sf $(prefix)/src/linux $(moddir)/source $(MAKECOOKIE) install-docs: @$(INSTALL_DOCS) $(WORKSRC)/Documentation/* $(MAKECOOKIE)