APPN = mailleur
#====================================================================
binary : rpm
+ @ echo "'$(APLV)' RPM binary file, building"
@ rpmbuild \
- --define "_topdir $(RPMDIR)" \
+ --quiet \
--rebuild \
+ --define "_topdir $(RPMDIR)" \
--target `uname -m` \
- $(RPMDIR)/SRPMS/$(APPN)-$(VERSION).$(RELEASE)-dvl.src.rpm
+ $(SRPM)/$(APPN)-$(VERSION).$(RELEASE)-*.src.rpm > /dev/null
+ @ echo "'$(APLV)' RPM binary file, ready"
rpm : cleanrpm tarfile spec
- @ echo "Making '$(APLV)' RPM source file"
- @ mkdir -p $(RPMDIR)/SOURCES;
- rpmbuild -bs \
+ @ echo "'$(APLV)' RPM source file, building"
+ @ mkdir -p $(SRPM)
+ @ rpmbuild -bs \
--quiet \
--define "_topdir $(RPMDIR)" \
--define "_source_filedigest_algorithm md5" \
--define "_binary_filedigest_algorithm md5" \
spec
- @ echo "'$(APLV)' RPM source file ready"
+ @ echo "'$(APLV)' RPM source file, ready"
tarfile : clean
- @ mkdir -p $(RPMDIR)/SOURCES;
- @ echo "Making '$(APLV)' tar file"
+ @ mkdir -p $(SRC)
+ @ echo "'$(APLV)' tar file, building"
@ mkdir -p \
$(APLV)/app \
+ $(APLV)/bin \
$(APLV)/lib \
$(APLV)
@ date > $(APLV)/$(APLV).build_date
@ cp -a Makefile* $(APLV)/
+ @ cp -a app/*.c $(APLV)/app/
+ @ cp -a lib/{*.c,*.h} $(APLV)/lib/
@ cp -a app/Makefile $(APLV)/app/Makefile
@ cp -a lib/Makefile $(APLV)/lib/Makefile
- @ tar zcf $(RPMDIR)/SOURCES/$(APLV).tar.gz $(APLV)
- @ echo "'$(APLV)' tar file ready"
+ @ tar zcf $(SRC)/$(APLV).tar.gz $(APLV)
+ @ echo "'$(APLV)' tar file, ready"
spec : $(APPN).spec.in
@ sed \
#====================================================================
#rpm definitions
RPMDIR = $(CURDIR)/rpmbuild
+SRC = $(RPMDIR)/SOURCES
+SRPM = $(RPMDIR)/SRPMS
#====================================================================
VERSION = $(shell echo `grep VERSION lib/numver.h | cut -d '"' -f2`)
RELEASE = $(shell echo `grep RELEASE lib/numver.h | cut -d '"' -f2`)