From: Jean-Marc Pigeon (Delson) Date: Mon, 16 Jun 2025 13:34:04 +0000 (-0400) Subject: Able to build binary file X-Git-Tag: tag-0.9~166 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=46c3b1ece97bf76a4b932f73d8e4709dc084c4e4;p=jmp%2Fmailleur Able to build binary file --- diff --git a/Makefile b/Makefile index 15e5d93..b949a9c 100644 --- a/Makefile +++ b/Makefile @@ -171,7 +171,11 @@ deltest : #Installation procedure #-------------------------------------------------------------------- install : - @ echo $@ need to implemented + @ # Creating all needed system directory + @ install -d $(DESTDIR)/$(SBINDIR) + @ cp -a \ + bin/* \ + $(DESTDIR)/$(SBINDIR)/ #-------------------------------------------------------------------- SUBDIR = \ diff --git a/Makefile.dist b/Makefile.dist index b8ec50c..c448c78 100644 --- a/Makefile.dist +++ b/Makefile.dist @@ -3,36 +3,42 @@ 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 \ @@ -50,6 +56,8 @@ cleanrpm: #==================================================================== #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`) diff --git a/app/feeder.c b/app/feeder.c index 5602a68..c70f7d4 100644 --- a/app/feeder.c +++ b/app/feeder.c @@ -28,7 +28,7 @@ //to answer static char titre[100]; //test title -static char testname[100]; //dest description +static char testname[300]; //test description typedef struct { char *destip; //IP to connect to diff --git a/mailleur.spec.in b/mailleur.spec.in index 76ee076..5f73775 100644 --- a/mailleur.spec.in +++ b/mailleur.spec.in @@ -23,6 +23,11 @@ search about email exchange within time and transaction context. #----------------------------------------------------------------------------- %files %defattr(-,root,root,-) +%{_sbindir}/chkspf +%{_sbindir}/feeder +%{_sbindir}/receiver +%{_sbindir}/sender +%{_sbindir}/sorter #============================================================================= %prep @@ -32,6 +37,10 @@ search about email exchange within time and transaction context. #building application %build +%{__make} \ + prod + + #----------------------------------------------------------------------------- %clean %{__rm} -rf %{buildroot} @@ -40,5 +49,9 @@ search about email exchange within time and transaction context. #installing program %install +%{__make} \ + DESTDIR="%{buildroot}" \ + install + #============================================================================= %changelog