CURDIR=mconsole PACKAGE_REV:=$(shell ./makeversion $(BUILD_SVNVER)) PROGS=mconsole vconsole OBJS=_dict.o LOCAL_CLEAN=local_clean LOCAL_INSTALL=local_install FLAGS=-g prog: $(PROGS) LDEVEL=/usr/lib64/linuxconf-devel include $(LDEVEL)/ccrules.mak proto: tlproto -c+ -f$(CURDIR).pm -ceo -f$(CURDIR).p *.tlcc msg: $(LDEVEL)/msgscan $(CURDIR) \ $(CURDIR).dic $(CURDIR).m EF *.{cc,tlcc} msg.eng: $(LDEVEL)/msgcomp -p./ /tmp/$(CURDIR).eng eE $(CURDIR) msg.clean: $(LDEVEL)/msgclean $(CURDIR).dic make msg make clean mconsole: mconsole.o $(OBJS) $(GPPLINK) -g mconsole.o $(OBJS) -o mconsole -llinuxconf -lstdc++ vconsole: vconsole.o $(OBJS) $(GPPLINK) -g vconsole.o $(OBJS) -o vconsole -llinuxconf -lstdc++ local_clean: rm -f $(PROGS) USR_BIN=$(RPM_BUILD_ROOT)/usr/bin USR_SBIN=$(RPM_BUILD_ROOT)/usr/sbin ETC=$(RPM_BUILD_ROOT)/etc USR_LIB_TLMP=$(RPM_BUILD_ROOT)/usr/lib/tlmp ETC_INITD=$(ETC)/init.d ETC_LOG=$(ETC)/logrotate.d ETC_PROFILED=$(ETC)/profile.d local_install: msg.eng mkdir -p $(USR_BIN) $(ETC_INITD) $(ETC_LOG) $(ETC_PROFILED) install mconsole $(USR_BIN)/mconsole install vconsole $(USR_BIN)/vconsole install -m755 vc $(USR_BIN)/vc install -m755 vc.sh $(ETC_PROFILED) mkdir -p $(USR_LIB_TLMP)/help.eng install /tmp/$(CURDIR).eng $(USR_LIB_TLMP)/help.eng test -f $(ETC_INITD)/mconsole || install -m755 mconsole.sysv $(ETC_INITD)/mconsole test -f $(ETC_LOG)/mconsole || install -m644 mconsole.rotate $(ETC_LOG)/mconsole # Produit le package RPMTOPDIR=$(HOME)/rpmbuild RPM=rpmbuild buildspec: sed s/RPMREV/$(RPMREV)/ <$(CURDIR).spec \ | sed s/REV/$(PACKAGE_REV)/ \ > $(RPMTOPDIR)/SPECS/$(CURDIR)-$(PACKAGE_REV).spec rm -fr /tmp/$(CURDIR)-$(PACKAGE_REV) mkdir /tmp/$(CURDIR)-$(PACKAGE_REV) cp -a * /tmp/$(CURDIR)-$(PACKAGE_REV)/. (cd /tmp/$(CURDIR)-$(PACKAGE_REV)/ && make clean && \ cd .. && tar zcvf $(RPMTOPDIR)/SOURCES/$(CURDIR)-$(PACKAGE_REV).src.tar.gz $(CURDIR)-$(PACKAGE_REV)) rm -fr /tmp/$(CURDIR)-$(PACKAGE_REV) buildrpm: buildspec unset LD_PRELOAD ; $(RPM) -ba $(RPMTOPDIR)/SPECS/$(CURDIR)-$(PACKAGE_REV).spec buildmyrpm: $(MAKE) RPM=myrpm RPMTOPDIR=/tmp/myrpm buildrpm buildmyspec: $(MAKE) RPM=myrpm RPMTOPDIR=/tmp/myrpm buildspec _dict.o: $(CURDIR).m REPO=http://svn.solucorp.qc.ca/repos/solucorp/mconsole distrpm: @eval `svn cat $(REPO)/trunk/Makefile | grep ^PACKAGE_REV=` ; \ $(MAKE) COPY="svn export --force $(REPO)/trunk/" \ PACKAGE_REV="$${PACKAGE_REV}r`svn st -u Makefile | tail -1 | while read a b c d ; do echo $$d ; done`" \ buildrpm