]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Able to build binary file
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 16 Jun 2025 13:34:04 +0000 (09:34 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 16 Jun 2025 13:34:04 +0000 (09:34 -0400)
Makefile
Makefile.dist
app/feeder.c
mailleur.spec.in

index 15e5d9391414f3b444e54a5622ab410a17b44cc4..b949a9cf47509f5e0c02c9a4d10fde67bb3af2f2 100644 (file)
--- 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 =                                               \
index b8ec50ce0561edbe9ff2af79eea306bb8225b66c..c448c78281c396eeeb9191ca4c8ed69fc0ae0c33 100644 (file)
@@ -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`)
index 5602a686ede14cf61be12146843a11a9f0d4f35a..c70f7d4dd9e9d067b887ada306c097e4bdb83718 100644 (file)
@@ -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
index 76ee07665fa612eb6068ab428abae3f965e46b97..5f73775fc019afe76631565f7c88fe1d55cdecf5 100644 (file)
@@ -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