Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

About debian package #315

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/make
PREFIX=/usr
MANDIR=$(PREFIX)/share/man
BINDIR=$(PREFIX)/bin
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ Using the persistent [systemd](https://wiki.archlinux.org/index.php/systemd#Basi
### Start on boot:
systemctl enable create_ap

### About Debian package
Please refer to debian/README.Debian

## License
FreeBSD
2 changes: 1 addition & 1 deletion create_ap.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COUNTRY=
FREQ_BAND=2.4
NEW_MACADDR=
DAEMONIZE=0
NO_HAVEGED=0
NO_HAVEGED=1
WIFI_IFACE=wlan0
INTERNET_IFACE=eth0
SSID=MyAccessPoint
Expand Down
34 changes: 34 additions & 0 deletions debian/README.Debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
createap for Debian
------------------
Any affort to make this program better is appreciated :)

I do this project just because I have studided Debian package system for some time, as well as I was troubled a lot by STUPID network-manager on my UKylin1604 os. And I have being using this create_ap script for a few days, and I like it very much for its stability.

Some tips that may do help to you are listed here:

You can configure this program by editing the create_ap.conf file before building this package, or just after it`s installed and to edit the /etc/create_ap.conf. (I recommend that you need just change the fllowing options according to the actual situation:
WIFI_IFACE=wlan0
INTERNET_IFACE=eth0
SSID=MyAccessPoint
PASSPHRASE=12345678
)

To build this debian package, run following comand in createap-xxx/:
debuild //you need to install devscripts first.
or:
dpkg-buildpackage -b

Install
apt-get install procps hostapd iproute2 iw dnsmasq
dpkg -i createap-xxx.deb

Remove
apt remove createap

To remove this package entirely:
apt remove createap --purge

...


-- caozuohua <[email protected]> Fri, 29 Dec 2017 09:57:54 +0800
10 changes: 10 additions & 0 deletions debian/README.source
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
createap for Debian
------------------

<this file describes information about the source package, see Debian policy
manual section 4.14. You WILL either need to modify or delete this file>



-- root <root@unknown> Fri, 29 Dec 2017 09:57:54 +0800

13 changes: 13 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
createap (0.4.6-1ubuntu1) UNRELEASED; urgency=medium

* I have found that the "NO_HAVEGED=1" option would cause something unexpected .
* Doing more test to make it easier to build and install it .
* Fix prerm script and add postrm script to stay clean .

-- caozuohua <[email protected]> Mon, 22 Jan 2018 16:02:33 +0800

createap (0.4.6-1) unstable; urgency=medium

* Initial release

-- caozuohua <[email protected]> Fri, 29 Dec 2017 09:57:54 +0800
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
30 changes: 30 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Source: createap
Section: net
Priority: optional
Maintainer: caozuohua <[email protected]>
Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.8
Homepage: https://github.com/oblique/create_ap
#Vcs-Git: https://anonscm.debian.org/collab-maint/createap.git
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/createap.git

Package: createap
Architecture: any
Depends:
procps,
hostapd,
iproute2,
iw,
dnsmasq,
${shlibs:Depends}, ${misc:Depends}
Description: This script creates a NATed or Bridged WiFi Access Point.
Features:
* Create an AP (Access Point) at any channel.
* Choose one of the following encryptions: WPA, WPA2, WPA/WPA2, Open (no encryption).
* Hide your SSID.
* Disable communication between clients (client isolation).
* IEEE 802.11n & 802.11ac support
* Internet sharing methods: NATed or Bridged or None (no Internet sharing).
* Choose the AP Gateway IP (only for 'NATed' and 'None' Internet sharing methods).
* You can create an AP with the same interface you are getting your Internet connection.
* You can pass your SSID and password through pipe or through arguments (see examples).
38 changes: 38 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: createap
Source: <url://example.com>

Files: *
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: <special license>
<Put the license of the package here indented by 1 space>
<This follows the format of Description: lines in control file>
.
<Including paragraphs>

# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2017 root <root@unknown>
License: GPL-2+
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 2 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 2 can be found in "/usr/share/common-licenses/GPL-2".

# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid picking licenses with terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.
1 change: 1 addition & 0 deletions debian/createap/DEBIAN/conffiles
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/create_ap.conf
20 changes: 20 additions & 0 deletions debian/createap/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Package: createap
Version: 0.4.6-1ubuntu1
Architecture: amd64
Maintainer: caozuohua <[email protected]>
Installed-Size: 87
Depends: procps, hostapd, iproute2, iw, dnsmasq
Section: net
Priority: optional
Homepage: https://github.com/oblique/create_ap
Description: This script creates a NATed or Bridged WiFi Access Point.
Features:
* Create an AP (Access Point) at any channel.
* Choose one of the following encryptions: WPA, WPA2, WPA/WPA2, Open (no encryption).
* Hide your SSID.
* Disable communication between clients (client isolation).
* IEEE 802.11n & 802.11ac support
* Internet sharing methods: NATed or Bridged or None (no Internet sharing).
* Choose the AP Gateway IP (only for 'NATed' and 'None' Internet sharing methods).
* You can create an AP with the same interface you are getting your Internet connection.
* You can pass your SSID and password through pipe or through arguments (see examples).
7 changes: 7 additions & 0 deletions debian/createap/DEBIAN/md5sums
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
b9b92e755188ac90c61fb62826c11c7e usr/bin/create_ap
142ed8b13fe26f2ab7e787f843ac064c usr/lib/systemd/system/create_ap.service
03132054c20ebb228f00c31602537896 usr/share/bash-completion/completions/create_ap
9e0671aa9868f2b6effa571bdf487091 usr/share/doc/create_ap/README.md
7658fd33560f0b80920b3fc07bac3039 usr/share/doc/createap/README.Debian
c56d991a48c6b79351be3d1e239b11af usr/share/doc/createap/changelog.Debian.gz
a47df3cfb2f2d0ead1b7a778f6d43846 usr/share/doc/createap/copyright
35 changes: 35 additions & 0 deletions debian/createap/DEBIAN/postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh
# postrm script for createap
#
# see: dh_installdeb(1)

set -e

PREFIX=/usr
MANDIR=${PREFIX}/share/man
BINDIR=${PREFIX}/bin

case "$1" in
remove|upgrade|deconfigure)
rm -f ${DESTDIR}${BINDIR}/create_ap
rm -f ${DESTDIR}/etc/create_ap.conf
[ ! -f /lib/systemd/system/create_ap.service ] || rm -f ${DESTDIR}${PREFIX}/lib/systemd/system/create_ap.service
rm -f ${DESTDIR}${PREFIX}/share/bash-completion/completions/create_ap
rm -f ${DESTDIR}${PREFIX}/share/doc/create_ap/README.md
;;

failed-upgrade)
;;

*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0
46 changes: 46 additions & 0 deletions debian/createap/DEBIAN/prerm
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/sh
# prerm script for createap
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package

PREFIX=/usr
MANDIR=${PREFIX}/share/man
BINDIR=${PREFIX}/bin

case "$1" in
remove|upgrade|deconfigure)
rm -f ${DESTDIR}${BINDIR}/create_ap
rm -f ${DESTDIR}/etc/create_ap.conf
[ ! -f /lib/systemd/system/create_ap.service ] || rm -f ${DESTDIR}${PREFIX}/lib/systemd/system/create_ap.service
rm -f ${DESTDIR}${PREFIX}/share/bash-completion/completions/create_ap
rm -f ${DESTDIR}${PREFIX}/share/doc/create_ap/README.md
;;

failed-upgrade)
;;

*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0
28 changes: 28 additions & 0 deletions debian/createap/etc/create_ap.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
CHANNEL=default
GATEWAY=10.0.0.1
WPA_VERSION=2
ETC_HOSTS=0
DHCP_DNS=gateway
NO_DNS=0
NO_DNSMASQ=0
HIDDEN=0
MAC_FILTER=0
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
ISOLATE_CLIENTS=0
SHARE_METHOD=nat
IEEE80211N=0
IEEE80211AC=0
HT_CAPAB=[HT40+]
VHT_CAPAB=
DRIVER=nl80211
NO_VIRT=0
COUNTRY=
FREQ_BAND=2.4
NEW_MACADDR=
DAEMONIZE=0
NO_HAVEGED=1
WIFI_IFACE=wlan0
INTERNET_IFACE=eth0
SSID=MyAccessPoint
PASSPHRASE=12345678
USE_PSK=0
Loading