summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: 82ef5d9e3b0be10779202c4d8bbd57d82b4085b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Maintainer (Arch): Kyle Keen <keenerd@gmail.com>

# # I maintain this because:
# Arch version lacks additional optimization and hardening flags
# Arch version has non-functional desktop file
# Arch version lacks the MSX++UnDeadPeopleEdition tileset
# Arch version lacks the @ soundpack
# Arch version lacks the CO.AG musicpack

pkgbase=cataclysm-dda
pkgname=(cataclysm-dda cataclysm-dda-tiles)
pkgname=cataclysm-dda
pkgver=0.F.3
_pkgver=0.F-3
pkgrel=1
pkgdesc="A post-apocalyptic roguelike."
#url="http://cataclysmrl.blogspot.com/"
#url="http://www.cataclysm.glyphgryph.com/"
#url="http://en.cataclysmdda.com/"
url="https://cataclysmdda.org/"
arch=('x86_64' 'aarch64')
license=("CCPL:by-sa")
depends=('ncurses' 'hicolor-icon-theme' 'gettext')
makedepends=('sdl2_image' 'sdl2_ttf' 'sdl2_mixer' 'freetype2' 'astyle')
source=("$pkgname-$_pkgver.tar.gz::https://github.com/CleverRaven/Cataclysm-DDA/archive/$_pkgver.tar.gz"
        "cataclysm-dda.desktop"
        "cataclysm-dda-tiles.desktop"

        "ammo-01_bugs.patch"

        "armor-01_ankle-ammo-pouch-is-not-a-backpack.patch"
        "armor-02_fix-survivor-fingerless-gloves-warmth.patch"

        "bionics-01_npc-can-use-more-bionics.patch"

        "foods-01_fix-food-materials.patch"

        "itemgroups-01_hk46-is-milspec.patch"
        "itemgroups-02_fix-shelter-batteries.patch"

        "meds-01_antibiotics-unhealthy.patch"

        "mutations-01_fix-evac3-background-visible.patch"

        "npc-01_dialogue-fixes.patch"

        "recipes-01_dragon-can-be-dismantled.patch"

        "terrain-01_tacoma-clinic-add-missing-floor.patch"
        "terrain-02_make-firestation-shelter-wells-npc-drinkable.patch"

        "tools-01_foldable-bottle-is-container.patch"
        "tools-02_normalize-drone-volume.patch"

        "vehicles-01_portable-generator-engine.patch"

        "etc-01_fix-rubbersplosion.patch"
        "etc-02_add-missing-price-postapoc.patch"

        "jc_ammo-loudness-ap-times-2.patch"
        "jc_allow-bio-firestarter-on-smoker.patch"
        "jc_stop-non-faction-npc-sleep-depirvation.patch"
        "jc_stop-non-faction-npc-malnourishment.patch"
        "jc_stop-sleeping-on-tables.patch"
        "jc_allow-hacker-laptop.patch"
        "jc_more-military-base-overmap.patch"
        "jc_npc-eat-from-further-camp.patch"
        
        "vampirism.patch"

        "cataclysm-dda-tileset_undeadpeople.tar.xz::https://library.iserlohn-fortress.net/cataclysm-dda-tileset_undeadpeople.git/snapshot/cataclysm-dda-tileset_undeadpeople-master.tar.xz"
        "cataclysm-dda-mod_battle-maid-redone-tileset.tar.xz::https://library.iserlohn-fortress.net/cataclysm-dda-mod_battle-maid-redone-tileset.git/snapshot/cataclysm-dda-mod_battle-maid-redone-tileset-master.tar.xz"
        "cataclysm-dda-soundpack_jcsoundpack.tar.xz::https://library.iserlohn-fortress.net/cataclysm-dda-soundpack_jcsoundpack.git/snapshot/cataclysm-dda-soundpack_jcsoundpack-master.tar.xz"
        "cataclysm-dda-musicpack_coag-musicpack.tar.xz::https://library.iserlohn-fortress.net/cataclysm-dda-musicpack_coag-musicpack.git/snapshot/cataclysm-dda-musicpack_coag-musicpack-master.tar.xz"
        )
b2sums=('2e715ff131ce654b0ad6f18cb465b80ab55a09e5d48434a7d209454c9a2a952970f572bb81539bf071efe1292310f5b922c75a6c86ba360cca13dbeb91e13996'
        '8cff87d80bf30b86f995f77a97cc1ddb7b809148d100f3c0d74e706fe59eac52de55710fb7aed1abd59836c05f2474c7d68455736aac4f229d1cdf806d7240a1'
        '8ffff827ed464af678497da5129eb69d3d1a4c6994bbcc00ef7f7b240cd04e7961c3c0ac52d6940252241406c04e647fac19c9327847afced33988eb15973ba8'
        'f71229fbaf2260602909187ba3894423a04c8625dc41813f2898faf4dcbeb6053007ea082201b1be68a59f6cbfd67e9e6a00d293e77c2f6bc1e225e3dc09ef9c'
        '7ca2d6bbccb4ecb6495d9b7cc114194364c454f40163ac9420c5dceb2027429c9737bb837748987bf8e8b3143bef25552fc9bd7ae5d25a31f8df94ecb093bdc2'
        'a00106a04f63aeed03a81fb2a3ca6f321fa5c21d0d342753a56c9cccc9000dda9d6e2204368f00aa37c75ce35967b9ea2537b3e7a48ce6a486343c8c2d7f239f'
        '900ec02ec9ec29a0b56341bbc9e947821e4c2c1f3e8914b2e59f317a2860d5b989afe5d1cd8585c60eb13b546167294a9253ad87a64775ad1d7152854bf6707a'
        'dd9026522976071a8cece8b935ab494e6a0e129b9242b043be3fbaa1478f75bedfbfab662d6286012fd5849e7b6bc097dea5de085d556bbfe1420d41ebddf81f'
        '4d91e3555c0979bb59f8841588aefcb041e04b035931ec95bea519cb2c6df49e72029fa38104b7c80c157114d62203ce57b877dc338f3d2b8a6a5fb5dcef4784'
        '31294c958b9c3d73cf460682f4a1260392b4e87fc04417e0d4ba02be73c3bd43f84537b30bcab09b7879f58c51cc2191d34ccef2f5fcec4d3dad7b1c522146e6'
        '8c946f6f8302b7d184663d79805be93f22578ce11c18f7dbe8fabdddf85cd1cc0617af180fec1cbf3419e310fe57b510b9b961ba2b16c93ef8a66e45258d326e'
        '33cbee2d251a4abf2ec507b31245205877d47152bd39000ea3058089b1fa45bbcb3624a7bbc58f394b1dd9710290f99c1708e3ece8221c71d760d67ff6965449'
        '794ac1cfe88250e1717f3093ce999b1bd2cfaaaa3800d7ad0a13b720efbcc2795ed8c82d558b6b5909a8359178c70f21fe41b1c9ffe726a7a89537140801ef90'
        'd6421c0f12e7c1a08eee1918c349e7d88e21d5ab980a65ad5798ef3b61319bd4570ecaf8d007d9905f471b623c3633a31c471f34fe5955a8f71229dc0bc52dda'
        'b8a64accada87ee5be989c5307805610c9b5c0327bc107aab237ac3225dd9e4c51b6c79a2a7de15fe187d3c32d7cbe1c462f9b0e9fb5d5a55a74236c7061e96e'
        '531f35be92feecdcc78faf4f76a538a075a144848b122616594eef7a0954aa6e2876f0007635a92f4be635060d0b58d943cd99dcec2889031363f7dd8d3bc58d'
        '71ddf9190b79669f7e63973ce5b4b3fe0de5d78f52bd76fbe63608a5f330ea757458af2172d5588b59ba48f99c6f43ec051a066ff6bc07c13dd2c5e05d8161f7'
        '8d6fd37497c2ce3c6e65933dded7cd27e165e74ce92cef01b4f1522cd550c8a4f227434d3e566f94e493c385226cf6ff52374d05686b203fd28fdca3babb471c'
        'b5567d516b344ceb382bb0253e2b87c90ddc5379afb76a7d384aec0829a6d8a3de2a1f55740871cd286a8cfa23ca635ee9e3f81faa9839dc10fb209955b63c78'
        '22779d1418f24d382431078a3fe35790edbbcfa94ed4c9bf2b2698fe00dbe87466c3dc460b3f02710440db63cf1aa255ab6cf589b06d1e0cf49f512657d588b1'
        '75b1410a950f3d964ed8b610af86f1a60f22ce4a4ebf242370a76e1c66f913c287f1b02dfa77c6d5901c77b060b6f432df06ed322b26fa71d180775f64afc57b'
        '623a0b62417b626817e33f376c14df69211313388ab65451f5eec0c512ee61bfe54871e57f3a6d873392110b538ea7ad18d5e8ac100a71f7fc036a6818d602c2'
        'fd1fabe15fa3127cfa2b5e60928ee9b48a98bd6e1e5f8f66a3f6625e7d7e076e7eae3048f1bb5a8b4c554679b4a28de30b97eedcb979050d9115c1f2685aae7d'
        'f346172ac4fdac9ffd7000901f6b145ff45df8abf6c8d495204c08af1e9a34809259819925ebbd0a1e54336701a1d0409671acae6c7c538dfd77ab4d4a506be1'
        '8bb83ab44365599cd58efef13ad0ddf7e6fbc62bf09523c029323efe2bfe2e80ed42dfbd790ade66d26e35e59de623133edb51b0a6dd81637928c205a08c1fc8'
        'd5287ddb4c38fbca9e6440e5243c718437660c9cf20a836baf1569575f6d953de8995641e6ec20a2a8859b9eefb5b975c416c4fe6f92f0916a5e21c3328d4fce'
        '4e40bc796ebd7941f76d9f11cfa62d7fa6d83c386f325bbec7f2cac99619c059cbf4611fb40ca0d78c8aa2cd3dd15a14de1f144d6f853e96939924caa87dac75'
        '831acc3935f1554a8385c804138a3d83423c5843824e7fbe01334c5d07accd826d9e14805584e6b91d9c6cdc4dbed99ffe32763440da07479f4f5480fbdb941b'
        'f13c5d89fdaf60621297e86537fc84992bec9d60446dfe41731abde53997223094b91cbf8173636241bc17ebd1f28cf3a33ece604ae67ea0b3c9b6a128c182f6'
        'a52e780086bfbc44e02de637ec03e99f4aacfc7471f9bc6f8650ad5b36694e4d17a2dcbbf8838e6ed2cd7ef85f43e82035771ad7f283c66dd55e2e4c4358ab84'
        'ea1ab36365d19be71bd6052e98082a8feb6bbdbe487e8e5795143ceb495059d157b034834bd532a80ccc5a16daa3c355dd56316a27936d441b7c9cc85e40f450'
        'a56efdaae0344726debf5b74846edce8df7aa2357fbc7a05a3d369d1f457b02934a0d0ce2330072e03f1ac901e06e333c9393f795c761f8440307e7649ed5596'
        '9d0e17552338c9d92ff696f1834a5d99c29d5dfbab6903b620410f62527a0ba60720c9ceec8e203b737f784ade8a53dbaca428ac7cc439f3f4f765aac7f1170f'
        'b9309da09b165fb57e83f84e3584d2479bd3336ed86e181e5df2d27daa92bd55d03d7f3fc226f03696af5f0f32d8e0e7ecd26ae7e50eed0200d0b0feaad07efb')

prepare() {
  cd "Cataclysm-DDA-$_pkgver"
  sed -i 's/-Werror//' Makefile
  sed -i 's/ncursesw5-config/ncursesw6-config/' Makefile
  sed -i 's/shell git/shell false/' Makefile
  sed -i 's/-Os/-O3/' Makefile


  # # # Hotfixes
  #echo "Applying hotfixes"


  # # # Various fixes for bugs I came across
  # # Ammo fixes
  echo "Applying ammo fixes"
  # Fix mulitple inconsistent ammuntion names and handloaded status.
  # Also Change reloaded_50bmg to be based on 50bmg: The id and description make it pretty clear that reloaded_50bmg is not supposed to be based on Match rounds.
  # Also set a fixed loudness of 20x66mm shotgun shells like that of other shotguns: Other shotguns have fixed loudness to work around how the short range factors causes them to be far quieter than one would otherwise expect.
  # Also fix ammo ordering so as to not prevent those items being modded: Having copy-from items occuring earlier in a json than the item being copied from prevents items based on it being modified.
  patch -Np1 -i "$srcdir"/ammo-01_bugs.patch


  # # armor fixes
  echo "Applying armor fixes"
  # Fix Ankle Ammo Pouch to not look like a backpack:
  # SDG added a tile for ammo pouches to bypass this bug, but this fix still makes sense.
  patch -Np1 -i "$srcdir"/armor-01_ankle-ammo-pouch-is-not-a-backpack.patch

  # Fix fingerless survivor gloves losing base warmth:
  # They lose warmth already from the lack of coverage, no need to double up.
  patch -Np1 -i "$srcdir"/armor-02_fix-survivor-fingerless-gloves-warmth.patch


  # # bionics fixes
  echo "Applying bionic fixes"
  # Fix npc not being able to install some additional CBMs:
  #  ie, soporific inducer, gasoline fuel cell, enhanced hearing, surgical scalpels.
  patch -Np1 -i "$srcdir"/bionics-01_npc-can-use-more-bionics.patch


  # # food fixes
  echo "Applying food fixes"
  # Fix several foods not being marked as the correct material:
  # This prevents odd outcomes such as carnivores drinking almond/soy milk and eating peanut butter.
  patch -Np1 -i "$srcdir"/foods-01_fix-food-materials.patch


  # # itemgroups fixes
  echo "Applying itemgroup fixes"
  # Stop police and SWAT carrying 4.6mm magazines despite having no compatible weapons:
  # The H&K UCP was removed from the base game some time ago.
  patch -Np1 -i "$srcdir"/itemgroups-01_hk46-is-milspec.patch

  # Fix items in unlooted, unused lockers and cabinets missing batteries:
  # They need to be marked as the battery contained inside the item.
  patch -Np1 -i "$srcdir"/itemgroups-02_fix-shelter-batteries.patch


  # # monster fixes
  echo "Applying medicine fixes"
  # Add -4 health to antibiotics:
  # weak are -2, strong are -10, this feels like a nice middle ground.
  patch -Np1 -i "$srcdir"/meds-01_antibiotics-unhealthy.patch


  # # monster fixes
  #echo "Applying monster fixes"


  # # mutation fixes
  echo "Applying mutation fixes"
  # Fix Evacuee 3 background 3 being player visible:
  # It was missing "player_display": false
  patch -Np1 -i "$srcdir"/mutations-01_fix-evac3-background-visible.patch


  # # npc fixes
  echo "Applying NPC fixes"
  # Assorted typos in NPC dialogue.
  patch -Np1 -i "$srcdir"/npc-01_dialogue-fixes.patch


  # # recipe fixes
  echo "Applying recipe fixes"
  # Fix reloaded dragon shot not allowing dismantling when every other non-caseless round does.
  patch -Np1 -i "$srcdir"/recipes-01_dragon-can-be-dismantled.patch


  # # terrain and overmap fixes
  echo "Applying terrain and overmap fixes"
  # Fix missing floor in the tacoma clinic:
  # The hospital is still a mess. :/
  patch -Np1 -i "$srcdir"/terrain-01_tacoma-clinic-add-missing-floor.patch

  # Fix npcs unable to drink from firestation and shelter basecamps wells:
  # They were missing the water_well blueprint_provides.
  patch -Np1 -i "$srcdir"/terrain-02_make-firestation-shelter-wells-npc-drinkable.patch


  # # tool fixes
  echo "Applying tool fixes"
  # Mark the foldable plastic bottle and steel water bottle as containers:
  # Being counted as tools didn't seem to fit their role.
  patch -Np1 -i "$srcdir"/tools-01_foldable-bottle-is-container.patch

  # Normalize the manhack volumes to that of the base grenade/explosive:
  # I don't see how a c-4 manhack could be 1/4 the volume of a stick of c-4.
  # Grenade hacks were also thrice as big as the base grenade.
  patch -Np1 -i "$srcdir"/tools-02_normalize-drone-volume.patch


  # # vehicle fixes
  echo "Applying vehicle fixes"
  # Replace the portable generator twin engine with a large 1 cylinder:
  # This way it can actually function as is.
  patch -Np1 -i "$srcdir"/vehicles-01_portable-generator-engine.patch



  # # Uncategorized for now
  echo "Applying uncategorized fixes"
  # Fix rubber items dismantling into 10x item volume of rubber.
  patch -Np1 -i "$srcdir"/etc-01_fix-rubbersplosion.patch

  # Add price_postapoc to a number of items that did not have one set.
  patch -Np1 -i "$srcdir"/etc-02_add-missing-price-postapoc.patch


  # # # Various other fixes for bugs I came across that modify src
  echo "Applying source code fixes"
  # Fix ammo loudness mulitplying by six instead of two.
  patch -Np1 -i "$srcdir"/jc_ammo-loudness-ap-times-2.patch

  # Fix smoker racks not accepting bionic firestarter.
  patch -Np1 -i "$srcdir"/jc_allow-bio-firestarter-on-smoker.patch

  # Fix Non-Player facton NPCs from becoming sleep deprived.
  patch -Np1 -i "$srcdir"/jc_stop-non-faction-npc-sleep-depirvation.patch

  # Fix Non-Player facton NPCs from becoming malnourished.
  patch -Np1 -i "$srcdir"/jc_stop-non-faction-npc-malnourishment.patch

  # Fix NPCs preferring tables to cots or woodstoves to the floor.
  patch -Np1 -i "$srcdir"/jc_stop-sleeping-on-tables.patch

  # Allow the hacker_laptop to utilize the extra functions.
  patch -Np1 -i "$srcdir"/jc_allow-hacker-laptop.patch

  # Port the revised military base layout from BN to DDA
  # Expand the overmap tiles for the miltiary base to be less MMMM
  patch -Np1 -i "$srcdir"/jc_more-military-base-overmap.patch

  # Allow npcs to pull food from the camp larder at the full range of tiles camp actions can be assigned from:
  # Should allow bases larger than 3x3 to have less food micromanagment for NPCs.
  patch -Np1 -i "$srcdir"/jc_npc-eat-from-further-camp.patch


  # # # Additional changes
  echo "Applying vampirism patch"
  # Add vampire mutation lines and modify a number of functions to facilitate these traits.
  patch -Np1 -i "$srcdir"/vampirism.patch
}

build() {
  cd "Cataclysm-DDA-$_pkgver"

  #export CFLAGS="$CFLAGS -fPIE"
  export CXXFLAGS="$CXXFLAGS -flto=auto -flto-odr-type-merging -fPIE"
  export LDFLAGS="$LDFLAGS,-pie"

  # tests "ifdef TILES" so "TILES=0" will enable tiles!
  # DYNAMIC_LINKING appears to be a windows flag?
  make PREFIX=/usr RELEASE=1 USE_XDG_DIR=1 BACKTRACE=0 RUNTESTS=0 LOCALIZE=1 LANGUAGES=all
  make PREFIX=/usr RELEASE=1 USE_XDG_DIR=1 BACKTRACE=0 RUNTESTS=0 LOCALIZE=1 LANGUAGES=all TILES=1 SOUND=1
  ./lang/compile_mo.sh
}

package_cataclysm-dda() {
  cd "Cataclysm-DDA-$_pkgver"

  make DESTDIR="$pkgdir" PREFIX="/usr" RELEASE=1 USE_HOME_DIR=1 LOCALIZE=1 LANGUAGES=all install

  # Docs
  install -d "$pkgdir/usr/share/doc/cataclysm-dda"
  cp --reflink -r doc/* "$pkgdir/usr/share/doc/cataclysm-dda"
  # undo symlink
  rm "$pkgdir/usr/share/doc/cataclysm-dda/JSON_LOADING_ORDER.md"
  cp --reflink 'data/json/LOADING_ORDER.md' "$pkgdir/usr/share/doc/cataclysm-dda/JSON_LOADING_ORDER.md"

  # License
  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  # Languages
  cd lang/mo
  for i in *; do
    install -d "${pkgdir}/usr/share/locale/${i}/LC_MESSAGES"
    cp "${i}/LC_MESSAGES/cataclysm-dda.mo" "${pkgdir}/usr/share/locale/${i}/LC_MESSAGES"
  done

  # Help
  cd ./../..
  cp -r --no-preserve=ownership "./data/help" "${pkgdir}/usr/share/${pkgname}/"

#  install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
}

package_cataclysm-dda-tiles() {
  pkgdesc="A graphical post-apocalyptic roguelike."
  depends=('cataclysm-dda' 'sdl2_image' 'sdl2_ttf' 'freetype2' 'sdl2_mixer')
  cd "Cataclysm-DDA-$_pkgver"

  make DESTDIR="$pkgdir" PREFIX="/usr" RELEASE=1 LOCALIZE=1 LANGUAGES=all TILES=1 SOUND=1 install

  # Icon
  install -D 'build-data/osx/AppIcon.iconset/icon_128x128.png' "$pkgdir/usr/share/icons/hicolor/128x128/apps/$pkgname.png"
  install -D 'build-data/osx/AppIcon.iconset/icon_128x128.png' "$pkgdir/usr/share/pixmaps/$pkgname.png"
  install -Dm644 "${srcdir}/$pkgname.desktop" "${pkgdir}/usr/share/applications/$pkgname.desktop"

  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"


  # Tileset
  mv "$srcdir/cataclysm-dda-tileset_undeadpeople-master" "$srcdir/undeadpeople"
  cp --reflink -r "$srcdir/undeadpeople" "$pkgdir/usr/share/cataclysm-dda/gfx"

  #mv "$srcdir/cataclysm-dda-mod_battle-maid-redone-tileset-master" "$srcdir/battle-maid-redone-tileset"
  cp --reflink -r "$srcdir/cataclysm-dda-mod_battle-maid-redone-tileset-master/battle-maid-redone-tileset-pt1" "$pkgdir/usr/share/cataclysm-dda/mods"
  cp --reflink -r "$srcdir/cataclysm-dda-mod_battle-maid-redone-tileset-master/battle-maid-redone-tileset-pt2" "$pkgdir/usr/share/cataclysm-dda/mods"

  #mv "$srcdir/cataclysm-dda-mod_vampire-stuff-redone-tileset-master" "$srcdir/vampire-stuff-redone-tileset"
  #cp --reflink -r "$srcdir/vampire-stuff-redone-tileset" "$pkgdir/usr/share/cataclysm-dda/mods"

  # Sound
  mv "$srcdir/cataclysm-dda-soundpack_jcsoundpack-master" "$srcdir/jcsoundpack"
  cp --reflink -r "$srcdir/jcsoundpack" "$pkgdir/usr/share/cataclysm-dda/sound"

  # Music
  mv "$srcdir/cataclysm-dda-musicpack_coag-musicpack-master" "$srcdir/coag-musicpack"
  install -Dm644 "$srcdir/coag-musicpack/musicset.json" "$pkgdir/usr/share/cataclysm-dda/sound/jcsoundpack/musicset.json"
  cp --reflink -r "$srcdir/coag-musicpack/music" "$pkgdir/usr/share/cataclysm-dda/sound/jcsoundpack"

  # hack: remove overlapping files
  cd "$pkgdir/../cataclysm-dda"
  find . -type f -exec rm -f "$pkgdir"/{} \;
  cd "$pkgdir"
  find . -type d -empty -delete
}