# Component-install: how to create the default package file without component name ?

**URL:** https://discourse.cmake.org/t/component-install-how-to-create-the-default-package-file-without-component-name/8380
**Category:** Usage
**Created:** [June 21, 2023, 8:22pm UTC](https://discourse.cmake.org/t/component-install-how-to-create-the-default-package-file-without-component-name/8380 "2023-06-21T20:22:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![neundorf](https://discourse.cmake.org/user_avatar/discourse.cmake.org/neundorf/32/2075_2.png) [@neundorf](https://discourse.cmake.org/u/neundorf)
#### Post date: [June 21, 2023, 8:22pm UTC](https://discourse.cmake.org/t/component-install-how-to-create-the-default-package-file-without-component-name/8380/1 "2023-06-21T20:22:52Z")

</div>

Hi,

I have a project, where headers etc. are installed into the “devel” component, and everything else in the default install component.  
The name of the default component is “Unspecified”, so the package files get the name foo-1.0.0-x86\_64-Unspecified.tar.gz and foo-1.0.0-x86\_64-devel.tar.gz.  
For the devel-package that is Ok, but for the main package I’d prefer to have no component name appear in the package file, i.e. foo-1.0.0-x86\_64.tar.gz.  
If I set CMAKE\_INSTALL\_DEFAULT\_COMPONENT\_NAME to “”, the package filename still contains “Unspecified”.

For rpm I can set CPACK\_RPM\_MAIN\_COMPONENT to be the same as ${CMAKE\_INSTALL\_DEFAULT\_COMPONENT\_NAME}, and then the rpm package for the default component is simply named foo-1.0.0-x86\_64.rpm.

Is there a way to achieve the same for the ARCHIVE generators ?  
If not, would introducing a new variable CPACK\_MAIN\_COMPONENT which would have to be used by all generators, and which would be used to initialize CPACK\_RPM\_MAIN\_COMPONENT) be a good idea ?

Thanks  
Alex

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [June 25, 2023, 7:50pm UTC](https://discourse.cmake.org/t/component-install-how-to-create-the-default-package-file-without-component-name/8380/2 "2023-06-25T19:50:38Z")

</div>

I think this sounds like a good feature request. CPack has grown quite organically over the years, so some things might not be as uniform as they should be.
