Declare dependencies in a makefile?

130 views
Skip to first unread message

Erich Beyrent

unread,
Apr 4, 2013, 9:25:48 AM4/4/13
to fpm-...@googlegroups.com
I'm new to packaging and fpm.  I have some openldap conf files, schemas, and an ldif that I want to package up, and I've written a Makefile to do the installation of those files.  I also want to declare openldap as a dependency on my new rpm.  Is there a way to declare this in the Makefile so that fpm picks that up, or is the --depends command line option the only way to do this?

Jordan Sissel

unread,
Apr 22, 2013, 12:03:45 AM4/22/13
to fpm-...@googlegroups.com
On Thu, Apr 4, 2013 at 6:25 AM, Erich Beyrent <erich....@pearson.com> wrote:
I'm new to packaging and fpm.  I have some openldap conf files, schemas, and an ldif that I want to package up, and I've written a Makefile to do the installation of those files.  I also want to declare openldap as a dependency on my new rpm.  Is there a way to declare this in the Makefile so that fpm picks that up, or is the --depends command line option the only way to do this?


I'm not totally sure I understand the question.

The only way to tell fpm about dependencies is with the --depends flag. You can declare anything you want in your Makefile and pass it to fpm. Does this answer it?

-Jordan

Erich Beyrent

unread,
May 16, 2013, 12:16:33 PM5/16/13
to fpm-...@googlegroups.com


Yes and no.  Here's the command:

 /usr/bin/fpm -s dir -t rpm \
        --name fen-ldap \
        --version 0.1 \
        --after-install after-install.sh \
        --config-files etc/openldap/slapd.conf \
        --config-files etc/openldap/schema/fen.schema \
        --architecture all \
        --depends "openldap" \
        etc/openldap/slapd.conf etc/openldap/schema/fen.schema DB_CONFIG \
        after-install.sh


When I try to install this rpm via yum, I don't see the dependency listed:

Examining ./fen-ldap-0.1-1.noarch.rpm: 1:fen-ldap-0.1-1.noarch
Marking ./fen-ldap-0.1-1.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package fen-ldap.noarch 1:0.1-1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================
 Package                     Arch                      Version                       Repository                                 Size
=====================================================================================================================================
Installing:
 fen-ldap                    noarch                    1:0.1-1                       /fen-ldap-0.1-1.noarch                     15 k

Transaction Summary
=====================================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)


Reply all
Reply to author
Forward
0 new messages