################################################################################ # Makefile settings for TMS systems packaging on Debian systems # Copyright (c) 2024 All Right Reserved, Beam Ltd, http://www.beam.ltd.uk ################################################################################ # TARGET_SYS = linux ARCH ?= $(shell arch) BUILDDOC = no SYSETCDIR = $(DEST_DIR)/etc SYSSYSTEMD = $(DEST_DIR)/usr/lib/systemd SYSDATADIR = $(DEST_DIR)/data BINDIR = $(DEST_DIR)$(PREFIX)/bin INCDIR = $(DEST_DIR)$(PREFIX)/include LIBDIR = $(DEST_DIR)$(PREFIX)/${ARCH_LIB} DATADIR = $(DEST_DIR)${PREFIX} DESKTOPDIR = $(DEST_DIR)/usr/share/applications DESKTOPDIRDIR = $(DEST_DIR)/usr/share/desktop-directories ICONSDIR = $(DEST_DIR)/usr/share/icons CONFDIR = $(DEST_DIR)$(PREFIX)/config DOCDIR = $(DEST_DIR)$(PREFIX)/doc HTMLDIR = $(DEST_DIR)$(PREFIX)/html STATETABLEDIR = $(DEST_DIR)$(PREFIX)/stateTables DATADIR = $(DEST_DIR)$(PREFIX)/data FPGADIR = $(DEST_DIR)$(PREFIX)/fpga # 32bit builds. Not complete #CXXFLAGS += -m32 #LDFLAGS += -m32 ifeq ("${ARCH}","x86_64") ARCH_LIB = lib64 else ARCH_LIB = lib endif # QT ifeq ("$(UseQt)", "5") QTVER = 5 QTINCDIR = /usr/include/x86_64-linux-gnu/qt5 QTMOC = /usr/lib/qt5/bin/moc QTRCC = /usr/lib/qt5/bin/rcc CXXFLAGS += -I/usr/include/qt5/qwt -I${QTINCDIR} -I${QTINCDIR}/Qt -I${QTINCDIR}/QtGui -I${QTINCDIR}/QtWidgets -I${QTINCDIR}/QtCore -I${QTINCDIR}/QtHelp LDLIBS_GUI := -lQt5Core -lQt5Gui -lQt5Widgets .PRECIOUS: ${BUILDDIR}%_moc.cpp ${BUILDDIR}%_moc.cpp: %.h @echo "Creating moc $@ ..." #mkdir -p $(BUILDDIR) $(QTMOC) -o $@ $< endif # Build DEB packages DEBBUILD_DIR = /tmp/debbuild/tms DISTDIR_RELEASE = /dist/cern/tms/${TARGET}_${DIST} all:: install-build-packages:: apt install build-essential bison flex qtbase5-dev libfftw3-dev libpci-dev dh-make lintian install-build-packages-i386:: dpkg --add-architecture i386 apt update apt install g++-multilib lib32z1 libpci-dev:i386 libstdc++-12-dev:i386 packages: debs packages-install: debs-install packages-sign: debs-sign ################################################################################ # DEB Software packages ################################################################################ # debs: -rm -fr ${DEBBUILD_DIR} -mkdir -p ${DEBBUILD_DIR}/tms cp -a Makefile Config.mk config tms tms-doc package/debian ${DEBBUILD_DIR}/tms sed -i -e "s/tms (.*)/tms (${VERSION}-${RELEASE})/" ${DEBBUILD_DIR}/tms/debian/changelog (cd ${DEBBUILD_DIR}/tms; dpkg-buildpackage -us -uc -nc -b) #lintian ${DEBBUILD_DIR}/tms-${VERSION}-${RELEASE}*.deb -rm -fr ${DEBBUILD_DIR}/tms debs-install: mkdir -p ${DISTDIR_RELEASE}/pool/main cp ${DEBBUILD_DIR}/*.deb ${DISTDIR_RELEASE}/pool/main sh package/debian/createrepo.sh ${DISTDIR_RELEASE} cp package/debian/tms-repo.list ${DISTDIR_RELEASE} debs-sign: gpg -abs -o ${DISTDIR_RELEASE}/dists/stable/Release.gpg ${DISTDIR_RELEASE}/dists/stable/Release cp ${HOME}/.gnupg/RPM-GPG-KEY-beam-ascii.asc ${DISTDIR_RELEASE}/tms-repo.asc setup: cp package/debian/tms-repo.list /etc/apt/sources.list.d apt update --allow-insecure-repositories