remove Red Hat targets

Signed-off-by: Clark Williams <williams@redhat.com>
This commit is contained in:
Clark Williams 2023-12-18 21:04:36 -06:00
parent b3a88e73d0
commit 18138326e5

View File

@ -1,8 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-or-later
VERSION := $(shell awk '/^Version:/ { print $$2 }' realtime-setup.spec)
VERSION := 2.4
$(info "Version: $(VERSION)")
RPMDIR := $(shell pwd)/rpm
RPMARGS := --define "_topdir $(RPMDIR)"
CC := gcc
ifeq ($(CFLAGS),)
@ -13,12 +11,7 @@ endif
CFLAGS += -fPIC -fplugin=annobin
LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
DISTVER := 8.0.0
DISTGITDIR := ../realtime-setup.rhpkg
DISTGITBRANCH := rhel-$(DISTVER)
FILES := realtime-setup-kdump \
slub_cpu_partial_off \
FILES := slub_cpu_partial_off \
rhel-rt.rules \
kernel-is-rt \
realtime-setup.sysconfig \
@ -31,34 +24,23 @@ FILES := realtime-setup-kdump \
EXT := bz2
TARBALL := realtime-setup-v$(VERSION).tar.$(EXT)
all: realtime-entsk
realtime-entsk: enable-netsocket-tstamp-static-key.c
$(CC) $(CFLAGS) -c enable-netsocket-tstamp-static-key.c
$(CC) $(LDFLAGS) -o realtime-entsk enable-netsocket-tstamp-static-key.o
rpm: srpm
rpmbuild $(RPMARGS) -ba realtime-setup.spec
rpmdir:
@[ -d rpm ] || mkdir -p rpm/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
srpm: clean rpmdir tarball
mv realtime-setup-v$(VERSION).tar.$(EXT) rpm/SOURCES
rpmbuild $(RPMARGS) -bs realtime-setup.spec
clean:
rm -f *~ *.tar.$(EXT)
rm -rf rpm
rm -f realtime-entsk *.o
tarball: rpmdir
tarball:
rm -f *.tar.$(EXT)
git archive --format=tar --prefix=realtime-setup-v$(VERSION)/ HEAD | \
bzip2 >realtime-setup-v$(VERSION).tar.$(EXT)
install:
install -m 755 -D realtime-setup-kdump $(DEST)/usr/bin/realtime-setup-kdump
install -m 755 -D slub_cpu_partial_off $(DEST)/usr/bin/slub_cpu_partial_off
install -m 644 -D rhel-rt.rules $(DEST)/etc/udev/rules.d/99-rhel-rt.rules
install -m 755 -D kernel-is-rt $(DEST)/usr/sbin/kernel-is-rt
@ -68,10 +50,3 @@ install:
install -m 644 -D realtime-entsk.service $(DEST)/usr/lib/systemd/system/realtime-entsk.service
install -m 755 -D -s realtime-entsk $(DEST)/usr/sbin/realtime-entsk
install -m 644 -D realtime-setup.service $(DEST)/usr/lib/systemd/system/realtime-setup.service
dist-git: tarball
cd $(DISTGITDIR) && rhpkg switch-branch --fetch $(DISTGITBRANCH)
cp $(FILES) $(DISTGITDIR)
cp realtime-setup-$(VERSION).tar.$(EXT) $(DISTGITDIR)
cd $(DISTGITDIR) && rhpkg new-sources realtime-setup-$(VERSION).tar.$(EXT)
@echo "files copied to $(DISTGITDIR)"