ddssff / cabal-debian

Create a Debianization by examining a .cabal file.
Other
16 stars 10 forks source link

Install data-files into /usr/share/PackageName/? #28

Closed ddssff closed 9 years ago

ddssff commented 9 years ago

Currently the data-files are installed into "/usr/share" </> map toLower packagename, but I'm pretty sure this is wrong (for packages that have capital letters in their names.) Also, it was ignoring the value returned by Distribution.PackageDescription.dataDir, but I think it needs to prefer this to the constructed value.

ddssff commented 9 years ago

Hmm, the only hackage package I see with data-dir set to a non-empty string are js-flot and js-jquery, which set them to just "javascript". Oh, haddock-api sets it to "resources", and haste-compiler sets it to "lib".

nomeata commented 9 years ago

haskell-devscripts passes --datasubdir=$(CABAL_PACKAGE). Why do you think it is wrong?

ddssff commented 9 years ago

So far I've been confusing where to find them in the source tree with where to put them in the installed binary package tree.

ddssff commented 9 years ago

I think I just need to stop lowercasing $(CABAL_PACKAGE) in Debian/Debianize/Input.hs

nomeata commented 9 years ago

Not really. The variable CABAL_PACKAGE is used for the foo in libghc-foo-dev (maybe a badly named variable, but it’s grown code...), so lower-casing this is correct.

Why do you have to know about the data directory at all? Doesn’t haskell-devscripts take care of that?

ddssff commented 9 years ago

Cabal-debian builds the debian/*.install files, which contain the files listed in the data-files field of the cabal file. It also adds files to the install files for other reasons.

ddssff commented 9 years ago

Oh, I wasn't going to leave it upper case for package names, just for the building the path to the directory containing the installed data files.

nomeata commented 9 years ago

Right, but I’m confused (independent of whether its a good idea or not) about why this is a cabal-debian bug, and not one against haskell-devscripts.

ddssff commented 9 years ago

This is confusing and I think it is resolved. So I'll close it.