Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
add - Initialize makefile
Browse files Browse the repository at this point in the history
We've initialized the makefiles.

---

We've initialized the makefile, as well as the debian packaging.

---

Type: add
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Aug 14, 2023
1 parent 58061ac commit f937967
Show file tree
Hide file tree
Showing 12 changed files with 351 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build-ppa-package-with-lintian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build Project (Debian Package, Lintian)

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: 'true'

- name: Import GPG
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

- name: Install required packages
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
sudo apt purge dotnet*
sudo apt autoremove
sudo apt install curl locales-all cli-common-dev libunwind8-dev libcurl4-openssl-dev rustc cargo devscripts debhelper-compat dput
- name: Initialize offline package
run: |
make debian-init-offline
- name: Make original package
run: |
mv debian ..
mv .github ..
tar cfv ../nuglobal_0.1.0.orig.tar .
xz ../nuglobal_0.1.0.orig.tar
mv ../debian .
- name: Build package
run: |
debuild -us -uc
cp ../*.deb .
- name: Upload package to artifacts
uses: actions/upload-artifact@v2
with:
name: NuGlobal-Debian-Package
path: "*.deb"
55 changes: 55 additions & 0 deletions .github/workflows/build-ppa-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build Project (Debian Package)

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: 'true'

- name: Import GPG
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

- name: Install required packages
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
sudo apt purge dotnet*
sudo apt autoremove
sudo apt install curl locales-all cli-common-dev libunwind8-dev libcurl4-openssl-dev rustc cargo devscripts debhelper-compat dput
- name: Initialize offline package
run: |
make debian-init-offline
- name: Make original package
run: |
mv debian ..
mv .github ..
tar cfv ../nuglobal_0.1.0.orig.tar .
xz ../nuglobal_0.1.0.orig.tar
mv ../debian .
- name: Build package
run: |
debuild --no-lintian -us -uc
cp ../*.deb .
- name: Upload package to artifacts
uses: actions/upload-artifact@v2
with:
name: NuGlobal-Debian-Package
path: "*.deb"
36 changes: 36 additions & 0 deletions .github/workflows/build-ppa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Project (for Launchpad PPA)

on:
push:
branches:
- main
pull_request:
branches:
- main


jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: 'true'

- name: Install required packages
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
sudo apt purge dotnet*
sudo apt autoremove
sudo apt install curl locales-all cli-common-dev libunwind8-dev libcurl4-openssl-dev rustc cargo devscripts debhelper-compat dput
- name: Initialize offline package
run: |
sudo ip netns add no-net
make debian-init-offline
- name: Try to build
run: |
sudo ip netns exec no-net make debian-all-offline
39 changes: 39 additions & 0 deletions .github/workflows/pushamend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Push to PPA (amend with original source)

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: 'true'

- name: Import GPG
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

- name: Install required packages
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
sudo apt purge dotnet*
sudo apt autoremove
sudo apt install curl locales-all cli-common-dev libunwind8-dev libcurl4-openssl-dev rustc cargo devscripts debhelper-compat dput
- name: Download original source
run: |
wget --output-document=../nuglobal_0.1.0.orig.tar.xz https://launchpad.net/~eofla/+archive/ubuntu/aptivi-devapps/+sourcefiles/nuglobal/0.1.0/nuglobal_0.1.0.orig.tar.xz
tar xf ../nuglobal_0.1.0.orig.tar.xz .
mv .github ..
- name: Build source package
run: debuild -S

- name: Push to Launchpad
run: dput ppa:eofla/aptivi-devapps ../nuglobal_0.1.0*_source.changes
45 changes: 45 additions & 0 deletions .github/workflows/pushtest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Push to PPA

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: 'true'

- name: Import GPG
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

- name: Install required packages
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
sudo apt purge dotnet*
sudo apt autoremove
sudo apt install curl locales-all cli-common-dev libunwind8-dev libcurl4-openssl-dev rustc cargo devscripts debhelper-compat dput
- name: Initialize offline package
run: |
make debian-init-offline
- name: Make original package
run: |
mv debian ..
mv .github ..
tar cfv ../nuglobal_0.1.0.orig.tar .
xz ../nuglobal_0.1.0.orig.tar
mv ../debian .
- name: Build source package
run: debuild -S -sa

- name: Push to Launchpad
run: dput ppa:eofla/aptivi-devapps ../nuglobal_0.1.0*_source.changes
46 changes: 46 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#
# NuGlobal Copyright (C) 2018-2023 Aptivi
#
# NuGlobal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# NuGlobal is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#

OUTPUTS = targets debian/nuglobal
BINARIES = targets/release/nuglobal
MANUALS = doc/nuglobal.1

.PHONY: all all-online-release debian-install

# General use

all: all-online

all-online:
cargo build

all-online-release:
cargo build --release

# Below targets are for Debian packaging only

debian-all-offline:
cargo build --release --offline

debian-install:
mkdir -m 755 -p debian/nuglobal/usr/bin
install -m 755 -t debian/nuglobal/usr/bin/ $(BINARIES)
install -m 755 -t debian/ $(MANUALS)

clean:
rm -rf $(OUTPUTS)

6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
nuglobal (0.1.0) jammy; urgency=medium

* Initial release

-- EoflaOE <[email protected]> Tue, 14 Aug 2023 20:48:50 +0300

18 changes: 18 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Source: nuglobal
Section: devel
Priority: optional
Maintainer: EoflaOE <[email protected]>
Build-Depends: debhelper-compat (= 12), cargo, rustc
Standards-Version: 4.4.0
Homepage: https://aptivi.gitbook.io/nuglobal-manual
Vcs-Browser: https://github.com/Aptivi/nuglobal
Vcs-Git: https://github.com/Aptivi/nuglobal.git

Package: nuglobal
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, cargo, rustc
Description: Offline NuGet Global Feed Initializer for Offline Builds
NuGlobal is the offline NuGet global feed initializer and manager for
offline builds of .NET projects. It allows you to install NuGet package
files to either your home directory or to your systemwide configuration
directory so that they can get initialized for offline .NET builds.
23 changes: 23 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: nuglobal
Source: https://github.com/Aptivi/nuglobal/blob/main/LICENSE

Files: *
Copyright: 2023 Aptivi <[email protected]>
License: GPL-3+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".

1 change: 1 addition & 0 deletions debian/nuglobal.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian/nuglobal.1
26 changes: 26 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/make -f
#
# NuGlobal Copyright (C) 2023 Aptivi
#
# NuGlobal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# NuGlobal is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#

%:
dh $@

override_dh_auto_build:
$(MAKE) debian-all-offline

override_dh_auto_install:
$(MAKE) debian-install
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)

0 comments on commit f937967

Please sign in to comment.