Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify location where RPM installs files #74

Closed
lewisskslipstone opened this issue Nov 14, 2013 · 1 comment · Fixed by #78
Closed

Specify location where RPM installs files #74

lewisskslipstone opened this issue Nov 14, 2013 · 1 comment · Fixed by #78

Comments

@lewisskslipstone
Copy link

Need to be able to specify where the RPM puts the files it installs. We need to remove the hard coded /usr/share in GenericPackageSettings

object GenericPackageSettings {
val installLocation = "/usr/share"
}

@jsuereth
Copy link
Member

Yeah, I'm generally unhappy that I have that /usr/share in there, and would like to have that default more configurable.

As a workaround, you can modify the mappings and symlinks after the fact:

def makeNewInstallPath(old: Path): String = 
     if(old startsWith "/usr/share")
        // Move to where you want it
     else old

linuxPackageMappings := {
  val old = linuxPackageMappings.value
  for(mappings <- old) yield {
      val fileMappings = for { 
         (file, installPath) <- mappings.mappings
      yield file -> makeNewInstallPath(installPath)
     mappings.copy(fileData = fileMappings)
  }
}

linuxPackageSymlinks := {
  val old = linuxPackageSymlinks.value
  for {
    LinuxSymlink(link, dest) <- old
  } yield LinuxSymlink(link, makeNewInstallPath(dest))
}

Hope that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants