diff --git a/bin/compile b/bin/compile index e516df6..86a222b 100755 --- a/bin/compile +++ b/bin/compile @@ -57,33 +57,77 @@ fi mkdir -p "$APT_CACHE_DIR/archives/partial" mkdir -p "$APT_STATE_DIR/lists/partial" -PACKAGES=" - gconf-service - libappindicator1 - libasound2 - libatk1.0-0 - libatk-bridge2.0-0 - libcairo-gobject2 - libdrm2 - libgbm1 - libgconf-2-4 - libgtk-3-0 - libnspr4 - libnss3 - libx11-xcb1 - libxcb-dri3-0 - libxcomposite1 - libxcursor1 - libxdamage1 - libxfixes3 - libxi6 - libxinerama1 - libxrandr2 - libxshmfence1 - libxss1 - libxtst6 - fonts-liberation -" +case "${STACK}" in + "heroku-20" | "heroku-22") + PACKAGES=" + fonts-liberation + libasound2 + libatk-bridge2.0-0 + libatk1.0-0 + libatspi2.0-0 + libcups2 + libdbus-1-3 + libdrm2 + libgbm1 + libgcc1 + libglib2.0-0 + libgtk-3-0 + libnspr4 + libnss3 + libpango-1.0-0 + libpangocairo-1.0-0 + libuuid1 + libx11-xcb1 + libxcb-dri3-0 + libxcomposite1 + libxcursor1 + libxdamage1 + libxfixes3 + libxi6 + libxkbcommon0 + libxrandr2 + libxshmfence1 + libxss1 + libxtst6 + " + ;; + "heroku-24") + PACKAGES=" + fonts-liberation + libasound2t64 + libatk-bridge2.0-0 + libatk1.0-0 + libatspi2.0-0 + libcups2 + libdbus-1-3 + libdrm2 + libgbm1 + libgcc1 + libglib2.0-0 + libgtk-3-0 + libnspr4 + libnss3 + libpango-1.0-0 + libpangocairo-1.0-0 + libuuid1 + libx11-xcb1 + libxcb-dri3-0 + libxcomposite1 + libxcursor1 + libxdamage1 + libxfixes3 + libxi6 + libxkbcommon0 + libxrandr2 + libxshmfence1 + libxss1 + libxtst6 + " + ;; + *) + error "STACK must be 'heroku-20', 'heroku-22' or 'heroku-24', not '${STACK}'." +esac + APT_OPTIONS="-o debug::nolocking=true -o dir::cache=$APT_CACHE_DIR -o dir::state=$APT_STATE_DIR" APT_FLAGS="--allow-downgrades --allow-remove-essential --allow-change-held-packages"