Custom RPM spec?

Comments

1 comment

  • Avatar
    juanjo

    1) The list of macros available when creating a custom spec file is:

    ${bitrock_rpm_topdir}: A reference to the %{_topdir} of the RPM
    ${bitrock_rpm_buildroot}: A reference to the buildRoot of the RPM (%{_topdir}/buildRoot)
    ${bitrock_rpm_copyright}: This is currently not configurable. It is resolved to "Other"  when not using a custom spec file
    ${bitrock_rpm_description}: Resolves to the <description> tag of the project
    ${bitrock_rpm_group}: Not configurable, it is resolved to "Applications" when not using a custom spec file
    ${bitrock_rpm_name}: Resolved to the <nativePackageName> of the project if provided. If not, it is resolved to the <shortName>
    ${bitrock_rpm_producturlinfoabout}: Set to the <productUrlInfoAbout> tag of the project.
    ${bitrock_rpm_release}: Set to the <release> of the project.
    ${bitrock_rpm_summary}: Set to the <summary> of the project.
    ${bitrock_rpm_vendor}: Set to the <vendor> of the project.
    ${bitrock_rpm_version}: Set to the <version> of the project.
    ${bitrock_rpm_post}: Replaced with the postInstallationActionList of the project
    ${bitrock_rpm_preun}: Replaced with the preUninstallationActionList of the project
    ${bitrock_rpm_postun}: Replaced with the postUninstallationActionList of the project
    

    2) You can simply use the sampley spec file and customize it with your needs, like changing the "Requires". The default internal spec file used by InstallBuilder is:

    %define installdir /
    BuildRoot: ${bitrock_rpm_buildroot}
    Group: ${bitrock_rpm_group}
    License: Other
    Release: ${bitrock_rpm_release}
    Name: ${bitrock_rpm_name}
    Vendor: ${bitrock_rpm_vendor}
    Version: ${bitrock_rpm_version}
    Summary: ${bitrock_rpm_summary}
    Requires: package1 package2 package3
    
    AutoReqProv: no
    %define __find_requires %{nil}
    AutoReq: 0
    %define _use_internal_dependency_generator 0
    %define _topdir ${bitrock_rpm_topdir}
    %define _rpmdir %{_topdir}
    %description
    ${bitrock_rpm_description}
    %post
    ${bitrock_rpm_post}
    %preun
    ${bitrock_rpm_preun}
    %postun
    ${bitrock_rpm_postun}
    %files
    %defattr(-,root,root)
    %installdir
    

    3) If provided, it will take precedence. You should keep the "installdir" in the spec file and the %files directive at the end if you want all the files configured in the project XML to be included.

    4) You will need to custom spec file if you want the dependencies to be handled by RPM.

Please sign in to leave a comment.