RE:rpm packaging problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello dev,

thanks for your reply.

I changed my daemon.tar.gz to daemon-1.tar.gz.

I have one doubt.

I put daemon-1.tar.gz into /home/user/rpmbuild/SOURCES directory.

[your question]
>IMHO, daemon-1.tar.gz is a better choice for your tarball (1 is your Version
>in the SPEC) and also the topleveldir of the tarball should be daemon-1. In
>this case you can use in %prep

Do I need to create daemon-1 directory inside the SOURCE directory and put that daemon-1.tar.gz inside it.

In my .rpmmacros in /home/user is,
[.rpmmacros]
%_topdir  /home/user/rpmbuild
%_tmppath /home/user/rpmbuild/tmp
%_bindir /home/user/rpmbuild/tmp
%_buildroot  %{_tmppath}/%{name}-root

[.rpmmacros]

Is it correct?.

[your question]
>Why noarch ? Is a binary package.
I am creating binary and source rpm.
My architecture is x86_64

Do I need to create x86_64 directory in /home/user/rpmbuild/RPMS direcory.  Is that binary rpm will go into this directory automatically.

My aim is to create that binary rpm, so that it make my daemon.c using make file and put that daemon executable and related object files in _tmpdir .

My make file for the daemon is,

[Makefile]
CC = gcc
CFLAGS  = -g -Wall

# typing 'make' will invoke the first target entry in the file
# (in this case the default target entry)
#
default: daemon


daemon:          daemon.o list.o
        $(CC) $(CFLAGS) -o daemon daemon.o list.o -lpthread
daemon.o:   daemon.c daemon.h
            $(CC) $(CFLAGS) -c daemon.c

list.o:      list.c list.h
                    $(CC) $(CFLAGS) -c list.c

install:
install daemon -d /home/user/rpmbuild/tmp

# To start over from scratch, type 'make clean'.  This
# removes the executable file, as well as old .o object
# files and *~ backup files:
#
clean:
                rm -f daemon *.o *~


[/Makefile]

I put this makefile in my daemon-1 direcory in /home/user/rpmbuild/SOURCES. after that I created daemon-1.tar.gz in that directory.

Is it correct or I need to put daemon-1.tar.gz in /home/user/rpmbuild/SOURCES/daemon-1 direcory.

Is anything I did wrongly.

please correct me.

thank you.


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux